Enha: detailed error

This commit is contained in:
Grail Finder
2026-02-03 16:56:31 +03:00
parent 0f5bbaa943
commit 76f14ce4a3
4 changed files with 148 additions and 25 deletions

View File

@@ -22,6 +22,28 @@ func isASCII(s string) bool {
return true
}
// refreshChatDisplay updates the chat display based on current character view
// It filters messages for the character the user is currently "writing as"
// and updates the textView with the filtered conversation
func refreshChatDisplay() {
// Determine which character's view to show
viewingAs := cfg.UserRole
if cfg.WriteNextMsgAs != "" {
viewingAs = cfg.WriteNextMsgAs
}
// Filter messages for this character
filteredMessages := filterMessagesForCharacter(chatBody.Messages, viewingAs)
displayText := chatToText(filteredMessages, cfg.ShowSys)
// Use QueueUpdate for thread-safe UI updates
app.QueueUpdate(func() {
textView.SetText(displayText)
colorText()
if scrollToEndEnabled {
textView.ScrollToEnd()
}
})
}
func colorText() {
text := textView.GetText(false)
quoteReplacer := strings.NewReplacer(