Add conditional output for non-tool call responses in runToolLoop

This commit is contained in:
Cheikh Seck committed 2026-04-12 16:31:17 +00:00
1 parent 87de19af51
commit e992c21e1f
1 file changed
+4 -2
+4 -2
View File
@@ -2192,8 +2192,10 @@ func runToolLoop(ctx context.Context, provider *config.Provider, servers []MCPSe
if !hasFinal {
if !looksLikeToolCall(resp) {
fmt.Printf("\n\n%s\n", renderMarkdown(resp))
return "", nil
if nocont {
fmt.Printf("\n\n%s\n", renderMarkdown(resp))
}
return resp, nil
}
if strings.TrimSpace(resp) != "" && (nocont || prevNoTool) {