Fix (ctrl+w): avoid msg duplication
This commit is contained in:
4
bot.go
4
bot.go
@@ -887,7 +887,9 @@ out:
|
|||||||
fmt.Fprint(textView, chunk)
|
fmt.Fprint(textView, chunk)
|
||||||
respText.WriteString(chunk)
|
respText.WriteString(chunk)
|
||||||
// Update the message in chatBody.Messages so it persists during Alt+T
|
// Update the message in chatBody.Messages so it persists during Alt+T
|
||||||
chatBody.Messages[msgIdx].Content = respText.String()
|
if !r.Resume {
|
||||||
|
chatBody.Messages[msgIdx].Content += respText.String()
|
||||||
|
}
|
||||||
if cfg.AutoScrollEnabled {
|
if cfg.AutoScrollEnabled {
|
||||||
textView.ScrollToEnd()
|
textView.ScrollToEnd()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user