Repository navigation
fix(web): show useful details in tool call previews - #75
Merged
Merged
Conversation
Replace the Before/After text blocks with jsdiff-generated unified patches, rendered through the same @pierre/diffs view the rest of the app uses. Oversized edits show a short notice instead of a clipped patch. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude forwards a subagent's tool calls as whole assistant messages tagged with parent_tool_use_id, not as stream events. The adapter only registered tools from stream events and dropped these messages, so the Agents panel never saw a subagent's tool calls. Register their tool_use blocks with the owning agent; the matching tool_result completes them. Tool labels for file, search and fetch tools now use their target instead of the tool's raw JSON input. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Name rows after the tool (Edit, Write, Read) instead of its category. - Show small Write calls as an all-addition diff. - Key tool diffs by content so worker highlights match their diff, and fall back to plain hunks if the diff renderer still fails. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Tool previews often repeated a file path while hiding the edit itself. Preserve a bounded summary before activity payload slimming, then show it in agent hover previews and expanded tool details. Edits render as unified diffs (generated with jsdiff, shown with the app's existing
@pierre/diffsview) with line totals; reads include ranges; searches include patterns and filters; commands include working directories and exit codes when available.Compared the parsing with fd-symphony's
agent_tool_call_logging.py. The shared formatter supports provider input envelopes and caps previews at 2,400 characters, with bounded traversal and excerpts. Agent completions retain earlier details and preview contents are searchable. Web and desktop share the Agents UI; web and mobile share chat detail formatting. Existing MCP detail rendering is preserved.Validation: 249 focused tests passed, targeted lint passed, and web/server/client-runtime typechecks passed. A real web-client pass verified the same edit fixture against the old and new code in isolated state.
The same isolated edit fixture, expanded before and after:
Follow-ups in this PR:
parent_tool_use_id, not as stream events. The adapter dropped those messages, so Claude subagents never showed any tool calls. It now records them against the owning agent, and the matchingtool_resultcompletes them. Claude tool labels for file, search and fetch tools use their target (Write: /path) instead of raw JSON.Edit,Write,Read,Bash) instead of the category (File change,Tool call).@@/-/+lines.Images are hosted in a dedicated GitHub review-evidence release; no screenshot assets are committed.
Model: GPT-6.1-Sol (Codex through T3 Code); unified diff rendering finished by Claude Opus 5.5 (Claude Code through T3 Code).
🤖 Generated with Claude Code