Repository navigation
Live tool call popup: show arguments that arrive in a later tool_call_update - #1192
Merged
catatafishen merged 1 commit intoOct 20, 2026
Conversation
Symptom: clicking a tool chip during or after a live OpenCode session opens the popup with "Inputs 0 chars" even though the tool had input, while the same session reloaded from history shows the inputs fine. Root cause: OpenCode emits session/tool_call with an empty rawInput and only reveals the input in a later session/tool_call_update. The store side already captures those late arguments (issue catatafishen#1008), but NativeChatPanel.updateToolCall dropped them, so the per-chip UI state kept a null arguments field for the rest of the live session even though the persisted row had the full input. Fix: apply update.arguments in NativeChatPanel.updateToolCall the same way ConversationEntryStore does, and re-derive the chip label once the input is known when the arguments carry a title field. Blank argument updates are skipped on both sides, so a blank update cannot wipe an input captured earlier and history replay stays in sync with the live popup. Trade-offs: label re-derivation only fires when the chip was created without arguments, so chips labeled from their initial arguments never change.
BambinoSK
requested a deployment
to
fuzzing-gate
October 19, 2026 19:12 — with
GitHub Actions
Waiting
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
catatafishen
approved these changes
Oct 20, 2026
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1191.
Problem
During a live session, clicking a tool chip opens the tool call popup with
Inputs 0 chars (~0 tokens)even though the tool had input, while reloading the same session from history shows the inputs correctly. OpenCode emitssession/tool_callwith an emptyrawInputand only reveals the tool input in a latersession/tool_call_update; the store captures those late arguments (that was #1008), butNativeChatPanel.updateToolCalldropped them, so the per-chip UI state keptarguments = nullfor the rest of the live session. The popup builds its Inputs section from that state, and the chip label is derived from the arguments at chip creation time, when they are still unknown.What this PR does
NativeChatPanel.updateToolCallappliesupdate.argumentsto the chip'sToolCallData, mirroringConversationEntryStore.updateToolCall, so the live popup shows the same inputs history replay shows. Blank argument updates are skipped on both sides, so a blank update cannot wipe an input captured earlier and history replay stays in sync with the live popup.title(or a sleep-style label), the chip label and the popup title are re-derived via the existingToolCallArgParserhelpers. Chips labeled from their initial arguments are never touched.Notes for reviewers
rawInputshape; agents that send full arguments up front see no behavior change.applySubAgentDetails).Verification
./gradlew :plugin-core:test --tests 'com.github.catatafishen.agentbridge.ui.NativeChatToolCallArgumentsTest': 6 tests, all green (new regression tests for late arguments, blank-update tolerance and chip relabeling)../gradlew :plugin-core:test --tests 'com.github.catatafishen.agentbridge.session.ConversationEntryStoreTest': 43 tests, all green (one new test pins that a blank late update cannot wipe captured arguments).executecall's popup shows the executed input in the live session, where it previously showedInputs 0 chars.How to verify the interactive behavior
executetool (any task that triggers a JS tool call works).executechip: the popup's Inputs section shows the JSON that was executed, with the char/token count and the copy link.Closes #1191