summaryrefslogtreecommitdiff
path: root/bot.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-01 12:28:23 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-01 12:28:23 +0300
commit01d8bcdbf58aee18643645ac292e26904551776e (patch)
treecd35938d2d0c43b6c0f241cbb93cd9f8ed24e84e /bot.go
parentf6a395bce9343a9224b2c43b231a749108acad1e (diff)
Enha: avoid \n\n in tool collapse
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 1df1665..bf3a239 100644
--- a/bot.go
+++ b/bot.go
@@ -1207,11 +1207,11 @@ func chatToTextSlice(messages []models.RoleMsg, showSys bool) []string {
// This is a tool call indicator - show collapsed
if toolCollapsed {
toolName := messages[i].ToolCall.Name
- resp[i] = fmt.Sprintf("%s\n%s\n[yellow::i][tool call: %s (press Ctrl+T to expand)][-:-:-]\n", icon, messages[i].GetText(), toolName)
+ resp[i] = strings.ReplaceAll(fmt.Sprintf("%s\n%s\n[yellow::i][tool call: %s (press Ctrl+T to expand)][-:-:-]\n", icon, messages[i].GetText(), toolName), "\n\n", "\n")
} else {
// Show full tool call info
toolName := messages[i].ToolCall.Name
- resp[i] = fmt.Sprintf("%s\n%s\n[yellow::i][tool call: %s][-:-:-]\nargs: %s\nid: %s\n", icon, messages[i].GetText(), toolName, messages[i].ToolCall.Args, messages[i].ToolCall.ID)
+ resp[i] = strings.ReplaceAll(fmt.Sprintf("%s\n%s\n[yellow::i][tool call: %s][-:-:-]\nargs: %s\nid: %s\n", icon, messages[i].GetText(), toolName, messages[i].ToolCall.Args, messages[i].ToolCall.ID), "\n\n", "\n")
}
continue
}