improve: add cancelled tool messages#9955
Conversation
RomneyDa
left a comment
There was a problem hiding this comment.
@uinstinct constructMessages already defaults to a NO_TOOL_CALL_OUTPUT_MESSAGE case for any toolCallState without tool output. Could you check why this isn't working? It seems like maybe toolCalls and toolCallStates are getting out of sync?
| }); | ||
| } | ||
|
|
||
| console.log("debug1 msg->", msgs); |
Should have checked this one before putting up the PR - had initially thought there might be problem in parallel tool calls so went ahead with resolution before checking the cause. Checked and found out that cancelled tool messages are present for both normal and parallel tool calls. Compaction also works due to the earlier pr closing this PR |
|
yeah I wonder if we're just a bit behind on releases and still getting issues from old versions. I'll try to get releases out this week. |
Description
For dangling tool calls in normal messages, add cancelled messages in chat history.
closes CON-5280
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Continue Tasks:▶️ 2 queued — View all
Summary by cubic
Adds “Tool cancelled” messages to the chat when an assistant tool call has no matching result. Prevents dangling tool calls and keeps history consistent (CON-5280).
Written for commit 5e5f5b9. Summary will update on new commits.