-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
area:toolsRelates to tool usageRelates to tool usagekind:bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavioros:macHappening specifically on MacHappening specifically on Mac
Description
Before submitting your bug report
- I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- I'm not able to find a related conversation on GitHub discussions that reports the same bug
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: MacOS
- Continue version: 1.3.24
- IDE version: 1.107
- Model: M2Description
When the model calls create_new_file, and the contents argument is, itself, valid JSON, the contents argument is an object, not a string, because this snippet in core/context/retrieval/pipelines/BaseRetrievalPipeline.ts:
const parsed = JSON.parse(responseContent);
toolCalls = parsed.tools || [];Will have deeply parsed the response. This causes getStringArg() to throw an error. Instead, if the type of args[argName] is 'object', it should be coerced back to a string with JSON.stringify()
I'll submit a PR shortly for this
To reproduce
- Enable tool calls
- Ask a model in agent mode: "Create a new file called sample.json"
Log output
Metadata
Metadata
Assignees
Labels
area:toolsRelates to tool usageRelates to tool usagekind:bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavioros:macHappening specifically on MacHappening specifically on Mac
Type
Projects
Status
Done