diff --git a/bot.go b/bot.go index 384563e..84f1a44 100644 --- a/bot.go +++ b/bot.go @@ -1398,10 +1398,14 @@ func chatToTextSlice(messages []models.RoleMsg, showSys bool) []string { // This is a tool call indicator - show collapsed if toolCollapsed { toolName := messages[i].ToolCall.Name + argsPreview := messages[i].ToolCall.Args + if len(messages[i].ToolCall.Args) > 30 { + argsPreview = messages[i].ToolCall.Args[:30] + } 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), + "%s\n%s\n[yellow::i][tool call: %s %s (press Ctrl+T to expand)][-:-:-]\n", + icon, messages[i].GetText(), toolName, argsPreview), "\n\n", "\n") } else { // Show full tool call info diff --git a/helpfuncs.go b/helpfuncs.go index 057b368..f8a85c3 100644 --- a/helpfuncs.go +++ b/helpfuncs.go @@ -595,7 +595,6 @@ func executeCommandAndDisplay(cmdText string) { return } } - // Use /bin/sh to support pipes, redirects, etc. cmd := exec.Command("/bin/sh", "-c", cmdText) cmd.Dir = workingDir