summaryrefslogtreecommitdiff
path: root/bot.go
diff options
context:
space:
mode:
Diffstat (limited to 'bot.go')
-rw-r--r--bot.go4
1 files changed, 2 insertions, 2 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)