You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent: creating a JSON file shows [object Object] instead of its contents #13362
Continue version: 2.0.0 (also checked on main at 5522c6f)
IDE version: VS Code 1.141.0
Model: Qwen3.6-Coder 35B, served locally through an OpenAI-compatible API (provider openai)
Description
In Agent mode, when the model creates a .json file (for example package.json or tsconfig.json) and sends its contents as a JSON value rather than a string, the tool call in the chat shows:
[object Object]
instead of the file contents. Qwen models do this often for JSON files.
Cause: the GUI parses the tool call arguments deeply, so parsedArgs.contents is an object. FunctionSpecificToolCallDiv passes it to CreateFile, which puts it in a template string (gui/src/pages/gui/ToolCallDiv/FunctionSpecificToolCallDiv.tsx, fileContents={args?.contents ?? ""}).
To reproduce
A test that renders FunctionSpecificToolCallDiv for create_new_file with parsedArgs = { filepath: "app/package.json", contents: { name: "app", version: "1.0.0" } }: the preview source is [object Object].
Activity