Description
Fix a bug where object/array parameters in the tool execution side panel display as [object Object] after running a tool and navigating back to edit params.
Root cause: When a tool is executed with object/array params, the form submission parses JSON strings into JS objects (JSON.parse(value)). These parsed objects are stored and passed back as the data prop to ToolInputForm. The useForm hook received these raw objects as defaultValues, and when React renders them in <Input> elements, it calls .toString() → [object Object].
Fix: Sanitize the data prop by JSON.stringify-ing any object/array values before passing to useForm as defaultValues, so the form correctly displays editable JSON text.
How did I test this PR
pnpm lint — 0 errors (328 pre-existing warnings)
pnpm build — passes successfully
Triggered by: dhawal@composio.dev | Source: slack
Session: https://zen-api-production-4c98.up.railway.app/dashboard/#/chat/zen-6799895005cc