mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 03:13:41 +08:00
A tool/MCP call could render 2+ times in the timeline (issue #521). The tool is invoked once — this is a display artifact. The segment de-dup in MessageBubble keyed on `toolName::toolArgs`, which fails two ways: - The same logical call rendered on both the live SSE stream and the reloaded/persisted path can carry differing toolArgs strings (whitespace / key-order from re-serialization), so the two are NOT de-duplicated and both survive → the reported duplicate. - Genuine repeated calls of the same tool with identical args (e.g. shell / python retries) share the key and get wrongly collapsed to one. Prefer the LLM-provided toolCallId (carried end-to-end on both live and persisted segments, stable across serialization) and fall back to toolName::toolArgs only for legacy segments without an id. This fixes both the visible duplication and the over-collapse. Adds pure-function tests for the de-dup logic. |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| test | ||
| .npmrc | ||
| eslint.config.mjs | ||
| index.html | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| TEST_CASES.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
| vitest.config.ts | ||