Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,12 @@ func runPrompt(
})

if len(toolResults) > 0 {
*messages = append(*messages, history.HistoryMessage{
Role: "user",
Content: toolResults,
})
for _, toolResult := range toolResults {
*messages = append(*messages, history.HistoryMessage{
Role: "tool",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain about the role, but this works for me...

Content: []history.ContentBlock{toolResult},
})
}
// Make another call to get Claude's response to the tool results
return runPrompt(ctx, provider, mcpClients, tools, "", messages)
}
Expand Down