Show tool call parameters in expanded tool blocks - #69
Merged
Conversation
…b, Bash, and Skill tool blocks Previously these tools expanded to show empty content because the regex- captured text was empty and only Task/TaskCreate/TaskUpdate had metadata extraction from input_json. Extract parameter display logic into a reusable tool-params utility with metadata tags (file, pattern, glob, mode, etc.) and fallback content generation (Edit diffs, Write previews, generic key-value display). Fixes #66 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use null checks instead of truthiness for offset/limit (preserves 0) and Write content (shows "(empty file)" marker for empty strings). Add tests for both edge cases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
cc @cderv |
roborev: Combined Review (
|
|
Awesome thanks. Glad the report was useful ! |
cursor Bot
pushed a commit
to diazMelgarejo/periscope
that referenced
this pull request
Jun 1, 2026
## Summary - Extract tool parameter display logic into `tool-params.ts` utility with metadata tags and fallback content generation - When expanding Read, Edit, Write, Grep, Glob, Bash, and Skill tool blocks, show structured metadata tags (file, pattern, glob, mode, etc.) and generated fallback content (Edit diffs, Write previews, generic key-value display) instead of empty space - Add 31 unit tests covering all tool types, truncation, and edge cases (zero-valued params, empty Write content) <img width="1216" height="340" alt="image" src="https://github.com/user-attachments/assets/292fa989-9091-4b6c-ac9f-9f5ba41bce38" /> Fixes kenn-io#66 ## Test plan - [ ] Run `npx vitest run src/lib/utils/tool-params.test.ts` -- 31 tests pass - [ ] Run `npm run check` in frontend/ -- 0 errors - [ ] Open a Claude Code session with Read/Edit/Write/Grep tool calls, expand them, verify parameters are displayed 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <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.
Summary
tool-params.tsutility with metadata tags and fallback content generationFixes #66
Test plan
npx vitest run src/lib/utils/tool-params.test.ts-- 31 tests passnpm run checkin frontend/ -- 0 errors🤖 Generated with Claude Code