Enha: keep empty line between messages
This commit is contained in:
2
bot.go
2
bot.go
@@ -657,7 +657,7 @@ func chatRound(userMsg, role string, tv *tview.TextView, regen, resume bool) {
|
|||||||
go sendMsgToLLM(reader)
|
go sendMsgToLLM(reader)
|
||||||
logger.Debug("looking at vars in chatRound", "msg", userMsg, "regen", regen, "resume", resume)
|
logger.Debug("looking at vars in chatRound", "msg", userMsg, "regen", regen, "resume", resume)
|
||||||
if !resume {
|
if !resume {
|
||||||
fmt.Fprintf(tv, "[-:-:b](%d) ", len(chatBody.Messages))
|
fmt.Fprintf(tv, "\n[-:-:b](%d) ", len(chatBody.Messages))
|
||||||
fmt.Fprint(tv, roleToIcon(botPersona))
|
fmt.Fprint(tv, roleToIcon(botPersona))
|
||||||
fmt.Fprint(tv, "[-:-:-]\n")
|
fmt.Fprint(tv, "[-:-:-]\n")
|
||||||
if cfg.ThinkUse && !strings.Contains(cfg.CurrentAPI, "v1") {
|
if cfg.ThinkUse && !strings.Contains(cfg.CurrentAPI, "v1") {
|
||||||
|
|||||||
3
tui.go
3
tui.go
@@ -1254,7 +1254,6 @@ func init() {
|
|||||||
// cannot send msg in editMode or botRespMode
|
// cannot send msg in editMode or botRespMode
|
||||||
if event.Key() == tcell.KeyEscape && !editMode && !botRespMode {
|
if event.Key() == tcell.KeyEscape && !editMode && !botRespMode {
|
||||||
msgText := textArea.GetText()
|
msgText := textArea.GetText()
|
||||||
|
|
||||||
if shellMode && msgText != "" {
|
if shellMode && msgText != "" {
|
||||||
// In shell mode, execute command instead of sending to LLM
|
// In shell mode, execute command instead of sending to LLM
|
||||||
executeCommandAndDisplay(msgText)
|
executeCommandAndDisplay(msgText)
|
||||||
@@ -1262,7 +1261,7 @@ func init() {
|
|||||||
return nil
|
return nil
|
||||||
} else if !shellMode {
|
} else if !shellMode {
|
||||||
// Normal mode - send to LLM
|
// Normal mode - send to LLM
|
||||||
nl := "\n"
|
nl := "\n\n" // keep empty lines between messages
|
||||||
prevText := textView.GetText(true)
|
prevText := textView.GetText(true)
|
||||||
persona := cfg.UserRole
|
persona := cfg.UserRole
|
||||||
// strings.LastIndex()
|
// strings.LastIndex()
|
||||||
|
|||||||
Reference in New Issue
Block a user