fix(client): keep Grok tool names across ACP tool_call_update patches - #2387
fix(client): keep Grok tool names across ACP tool_call_update patches#2387L42y wants to merge 1 commit into
Conversation
ACP completions often omit title and x.ai/tool meta. Merge by toolCallId so the Working lane does not overwrite a real name with grok:unknown.
yuezengwu
left a comment
There was a problem hiding this comment.
Reviewed exact head 785dc09b099777d8b54908e0f5712125b9feeb25.
The Grok ACP patch itself looks sound. Independent exact-head validation passed: git diff --check, pnpm check, build (5/5), typecheck (9/9), the 91 focused Grok tests, and the full client suite (2,898 passed, 7 skipped). All substantive CI jobs are also green.
Blocking issue: Check Branch Name fails because jeremy/grok-unknown-tool-merge does not match the repository's required prefixes (feat/, fix/, refactor/, test/, docs/, chore/, or merge/). Please move this change to a compliant branch/PR (for example, fix/grok-unknown-tool-merge) so the required check can pass, then request a fresh exact-head review.
|
Superseded by #2388 — same exact head |
Summary
tool_call_updateis a patch: later completed/failed updates often send onlystatus+rawOutputand omittitle/_meta["x.ai/tool"].grok:unknown. The Working lane then kept the latest row pertoolUseId, so a nameless completion overwrote a good start name.GrokToolInfobytoolCallIdbefore emitting session events. Keepgrok:unknownonly when that id has never had a name or title.Validation
biome checkon the four changed Grok filespnpm check(repo-wide)pnpm typecheck(repo-wide)pnpm --filter @first-tree/client exec vitest run src/providers/grok/__tests__/events.test.ts src/providers/grok/__tests__/handler.test.ts(91 passed)pnpm test(repo-wide)Change Surface
apps/clipublic CLI or help outputNotes
TOOL_VERBSmapping for Grok names (run_terminal_cmd/run_terminal_command) so shells render asrun <command>instead ofuse <title>