diff options
author | Grail Finder <wohilas@gmail.com> | 2024-12-10 17:55:10 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2024-12-10 17:55:10 +0300 |
commit | 5f780287aecedf08f94b6a1e0ae2a8822683a3fc (patch) | |
tree | 6de227e5f932bd5a2fa2cff3260ba23a68124e6d /tui.go | |
parent | 67f36d417fa97c4087e326623508370f60d3d3b8 (diff) |
Fix: display and upsert correct roles and icons
Diffstat (limited to 'tui.go')
-rw-r--r-- | tui.go | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -92,7 +92,6 @@ func startNewChat() { chatMap[newChat.Name] = newChat updateStatusLine() colorText() - return } func init() { @@ -313,7 +312,10 @@ func init() { textView.SetText(chatToText(cfg.ShowSys)) colorText() textView.ScrollToEnd() - initSysCards() + _, err = initSysCards() + if err != nil { + logger.Error("failed to init sys cards", "error", err) + } app.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { if event.Key() == tcell.KeyF1 { chatList, err := loadHistoryChats() @@ -400,7 +402,9 @@ func init() { logger.Error("failed to export chat;", "error", err, "chat_name", activeChatName) return nil } - notifyUser("exported chat", "chat: "+activeChatName+" was exported") + if err := notifyUser("exported chat", "chat: "+activeChatName+" was exported"); err != nil { + logger.Error("failed to send notification", "error", err) + } return nil } if event.Key() == tcell.KeyCtrlA { @@ -442,7 +446,7 @@ func init() { nl = "" } if msgText != "" { - fmt.Fprintf(textView, "%s[-:-:u](%d) <%s>: [-:-:-]\n%s\n", + fmt.Fprintf(textView, "%s[-:-:b](%d) <%s>: [-:-:-]\n%s\n", nl, len(chatBody.Messages), cfg.UserRole, msgText) textArea.SetText("", true) textView.ScrollToEnd() |