fix: support object-type arguments in tool call parsing #9743
+11
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In certain cases, the
toolCall.function.argumentsreturned by the LLM or intermediate processing layer can be an object rather than a JSON string, which may result infilepathbeing empty or incorrectly parsed when handling thecreate_new_filetool call.This PR adds proper validation and normalization for
filepathto ensure file creation works reliably across platforms (including macOS and Windows).Fixes #9045
Fixes #8764
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
N/A (logic fix in agent tool layer)
Tests
filepath)out/extension.js) locally to validate the fix in a real plugin environmentI have read the CLA Document and I hereby sign the CLA
Continue Tasks:▶️ 2 queued — View all
Summary by cubic
Support object-type tool call arguments to prevent parameter loss and ensure create_new_file gets a valid filepath. Fixes #9045 across macOS and Windows.
Written for commit 82f6f69. Summary will update on new commits.