fix: dispatch tool metadata on category for cross-agent consistency#116
fix: dispatch tool metadata on category for cross-agent consistency#116
Conversation
roborev: Combined Review (
|
extractToolParamMeta now accepts an optional category parameter and dispatches on it instead of raw tool_name. This makes Gemini tools (run_command, read_file, etc.) render with the same metadata tags as their Claude equivalents (Bash, Read, etc.). Also adds cmd meta tag for Bash category (first line, truncated) and normalizes param names (file_path/path, pattern/query) across agents. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Empty-string categories (from sessions that store blank categories) caused `category ?? toolName` to preserve the empty string, skipping all metadata extraction branches. Use `||` instead of `??` so empty strings fall back to toolName. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
004de50 to
2287ff7
Compare
roborev: Combined Review (
|
|
Invalid |
Summary
extractToolParamMetanow dispatches on normalizedcategory(Read, Bash, Edit, etc.) instead of rawtool_name, so Gemini tools (run_command,read_file,grep_search, etc.) render with the same metadata tags as their Claude equivalentscmdmeta tag for Bash category showing first line of command, truncated to 80 charsfile_path/path,pattern/query,command/cmd)extractToolParamMeta(toolName, params, category)call replaces the try-category-then-fallback-to-toolName patternFollow-up to #114. Missing ABOUTME file brief for
gemini.gowill be addressed in a separate PR.Test plan
npx vitest run src/lib/utils/tool-params.test.ts— 57 tests pass🤖 Generated with Claude Code