* fix(web): handle incomplete JSON in MCP tool call arguments (#528) When using stream_mode=["messages", "updates"] with MCP tools, tool call arguments arrive in chunks that may be incomplete JSON (missing closing braces). This caused JSON.parse() to throw errors in the frontend. Changes: - Add safeParseToolArgs() function using best-effort-json-parser to gracefully handle incomplete JSON from streaming - Replace direct JSON.parse() with safe parser in mergeMessage() - Add comprehensive tests for tool call argument parsing scenarios * Address the code review comments |
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| core | ||
| hooks | ||
| lib | ||
| styles | ||
| typings | ||
| env.js | ||
| i18n.ts | ||