From c3a5de7a0d2631c8eda71a54cad9587d3d8915e1 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Fri, 8 Aug 2025 13:08:21 +0300 Subject: Enha: showSys to skip sys or tool msgs --- bot.go | 4 ++-- tui.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.go b/bot.go index b2de311..21fcf25 100644 --- a/bot.go +++ b/bot.go @@ -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) diff --git a/tui.go b/tui.go index b91058c..ee0e5e6 100644 --- a/tui.go +++ b/tui.go @@ -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 { -- cgit v1.2.3