diff options
author | Grail Finder <wohilas@gmail.com> | 2024-11-26 22:16:18 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2024-11-26 22:16:18 +0300 |
commit | 7f48741b11038715f82747f1eacee14470547855 (patch) | |
tree | 80c88aea10f2dbfb12a4ac50139db9c293ac0006 /bot.go | |
parent | ad65c3583a47d09dc1b3b50fd02fb411344bd9ae (diff) |
Fix: continue llm resp; clear status line
Diffstat (limited to 'bot.go')
-rw-r--r-- | bot.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -122,11 +122,14 @@ func chatRound(userMsg, role string, tv *tview.TextView) { botRespMode = true reader := formMsg(chatBody, userMsg, role) if reader == nil { - return // any notification in that case? + logger.Error("empty reader from msgs", "role", role) + return } go sendMsgToLLM(reader) - fmt.Fprintf(tv, fmt.Sprintf("(%d) ", len(chatBody.Messages))) - fmt.Fprintf(tv, assistantIcon) + if userMsg != "" { // no need to write assistant icon since we continue old message + fmt.Fprintf(tv, fmt.Sprintf("(%d) ", len(chatBody.Messages))) + fmt.Fprintf(tv, assistantIcon) + } respText := strings.Builder{} out: for { |