Enha: showSys to skip sys or tool msgs

This commit is contained in:
Grail Finder
2025-08-08 13:08:21 +03:00
parent d7d432b8a1
commit c3a5de7a0d
2 changed files with 3 additions and 3 deletions

4
bot.go
View File

@@ -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)