mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-06 13:45:35 +02:00
fix: hide internal tool-result file reads from sidebar activity
Claude reads its own ~/.claude/projects/.../tool-results/ files as internal plumbing. These showed up as long unreadable paths in the sidebar. Now: describeToolCall returns empty for tool-result reads, and the sidebar skips rendering tool_use entries with no description. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -241,11 +241,15 @@ function handleAgentEvent(entry) {
|
||||
if (thinking) thinking.remove();
|
||||
|
||||
if (entry.type === 'tool_use') {
|
||||
const toolEl = document.createElement('div');
|
||||
toolEl.className = 'agent-tool';
|
||||
const toolName = entry.tool || 'Tool';
|
||||
const toolInput = entry.input || '';
|
||||
|
||||
// Skip tool uses with no description (e.g. internal tool-result file reads)
|
||||
if (!toolInput) return;
|
||||
|
||||
const toolEl = document.createElement('div');
|
||||
toolEl.className = 'agent-tool';
|
||||
|
||||
// Use the verbose description as the primary text
|
||||
// The tool name becomes a subtle badge
|
||||
const toolIcon = toolName === 'Bash' ? '▸' : toolName === 'Read' ? '📄' : toolName === 'Grep' ? '🔍' : toolName === 'Glob' ? '📁' : '⚡';
|
||||
|
||||
Reference in New Issue
Block a user