diff options
author | Grail Finder <wohilas@gmail.com> | 2025-08-08 13:08:21 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-08-08 13:08:21 +0300 |
commit | c3a5de7a0d2631c8eda71a54cad9587d3d8915e1 (patch) | |
tree | 33f268aeb546dd894bd7dc1f0e66e71dd775ac41 | |
parent | d7d432b8a1dbea9e18f78d835112fa074051f587 (diff) |
Enha: showSys to skip sys or tool msgs
-rw-r--r-- | bot.go | 4 | ||||
-rw-r--r-- | tui.go | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -454,8 +454,8 @@ func findCall(msg, toolCall string, tv *tview.TextView) { func chatToTextSlice(showSys bool) []string { resp := make([]string, len(chatBody.Messages)) for i, msg := range chatBody.Messages { - // INFO: skips system msg - if !showSys && (msg.Role != cfg.AssistantRole && msg.Role != cfg.UserRole) { + // INFO: skips system msg and tool msg + if !showSys && (msg.Role == cfg.ToolRole || msg.Role == "system") { continue } resp[i] = msg.ToText(i) @@ -558,7 +558,7 @@ func init() { if event.Key() == tcell.KeyF5 { // switch cfg.ShowSys cfg.ShowSys = !cfg.ShowSys - textView.SetText(chatToText(cfg.ShowSys)) // TODO: fix removing all new names + textView.SetText(chatToText(cfg.ShowSys)) colorText() } if event.Key() == tcell.KeyF6 { |