deerflow2/web/src
Willem Jiang e179fb1632
fix(web): handle incomplete JSON in MCP tool call arguments (#528) (#727)
* 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
2025-11-29 16:38:29 +08:00
..
app refactor: Welcome layout and conditional rendering (#690) 2025-11-21 09:27:14 +08:00
components fix: Optimize the performance of stream data processing and add anti-… (#642) 2025-10-22 23:08:18 +08:00
core fix(web): handle incomplete JSON in MCP tool call arguments (#528) (#727) 2025-11-29 16:38:29 +08:00
hooks feat(visualization): add workflow run animation logic 2025-04-29 16:46:50 +08:00
lib chore: add license header for web 2025-04-17 14:26:41 +08:00
styles FIX/Adapt message box to handle long text in frontend (#466) 2025-08-21 10:31:54 +08:00
typings chore: support raw-loader 2025-04-22 13:52:56 +08:00
env.js fix: make SSE buffer size configurable to prevent overflow during multi-round searches (#664) (#665) 2025-10-27 17:03:38 +08:00
i18n.ts feat: add i18n support and add Chinese (#372) 2025-07-12 15:18:28 +08:00