Skip to content

feat: Live Tool Call Stream — real-time feed with filtering and pause#174

Open
vivekchand wants to merge 1 commit intomainfrom
fix/gh-clawmetry-31-live-tool-stream
Open

feat: Live Tool Call Stream — real-time feed with filtering and pause#174
vivekchand wants to merge 1 commit intomainfrom
fix/gh-clawmetry-31-live-tool-stream

Conversation

@vivekchand
Copy link
Owner

Closes #31

What

Replaces the cramped 120px live activity feed on the Flow tab with a full-featured Live Tool Call Stream panel that shows real-time tool invocations across all sessions with filtering, pause, and result pairing.

How

UI (both themes):

  • 360px scrollable panel with tool call entries showing color-coded tool name badges
  • Filter pills: All, exec, read, write, edit, browser, search, message, spawn — click to show only that tool type
  • Pause/Resume button: freezes the UI while still buffering incoming events; resume replays them
  • Clear button to reset the stream
  • Tool result pairing: tool_end events display completion status alongside invocations
  • Filter status bar shows active filter and paused state

Backend:

  • New /api/tool-calls/recent endpoint on bp_logs blueprint
  • Scans the 10 most recent session JSONL files for tool_use/toolCall blocks
  • Pairs tool calls with tool results by matching IDs
  • Supports ?limit=N and ?tool=<name> query params

JS:

  • _toolStreamItems buffer (100 entries max) with toolName, color, timestamp
  • setToolFilter() updates pills and re-renders visible items
  • toggleToolStreamPause() buffers events while paused, replays on resume
  • loadRecentToolCalls() pre-populates the stream from the API on Flow tab init
  • extractToolName() parses tool names from log messages
  • getToolColor() maps each tool to a distinct color

Tests:

  • 4 new tests for /api/tool-calls/recent (structure, limit, filter, field validation)
  • All 55 existing tests pass

…ng (closes #31)

- Expand live feed from 120px → 350px tall, holds 200 events (up from 30)
- Add filter-by-tool input: real-time search across event text and category
- Add pause/resume toggle: freeze stream to inspect entries without scroll
- Add clear button to reset the feed
- Add category labels (tool, result, inbound, reply, ai, system, heartbeat)
  with colour-coded badges for fast scanning
- Surface tool_result events from SSE stream with snippet preview (first 80 chars)
- Rename panel header: 'Live Activity Feed' → 'Live Tool Call Stream'
- All 133 unit tests pass
@vivekchand vivekchand force-pushed the fix/gh-clawmetry-31-live-tool-stream branch from 9bb5a62 to eca58bb Compare March 19, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(v0.12): Live Tool Call Stream — real-time feed of tool calls across all active sessions

1 participant