Skip to content

Fix tool call visibility in chat sidebar#50

Closed
homanp wants to merge 2 commits intomainfrom
cursor/chat-tool-call-visibility-62c4
Closed

Fix tool call visibility in chat sidebar#50
homanp wants to merge 2 commits intomainfrom
cursor/chat-tool-call-visibility-62c4

Conversation

@homanp
Copy link
Copy Markdown
Owner

@homanp homanp commented Mar 20, 2026

What

Fix tool calls not being visible in the chat. Tool calls are now persisted in message history and rendered directly below the assistant message bubble so they remain visible while reading the latest reply.

Why

Tool calls were effectively hidden for two reasons:

  1. They were previously transient-only during streaming, so they disappeared after completion.
  2. After persistence was added, they rendered above the assistant bubble in subtle styling, which made them easy to miss or scroll past.

Changes

  • src/store/widget-store.ts
    • Added ToolCallEntry and toolCalls?: ToolCallEntry[] on WidgetMessage
    • Added appendToolCallToMessage to persist tool-call history on assistant messages
  • src/components/chat-sidebar.tsx
    • Store each tool-call SSE event on the current assistant message
    • Render tool calls below the assistant bubble with improved contrast
    • Keep the shimmer for active actions during streaming

Test plan

  • npm run lint
  • Manual UI verification in browser
  • Manual verification with injected persisted toolCalls state to confirm exact sidebar rendering
  • Demo video + screenshot captured showing visible tool call rows in the sidebar
Open in Web Open in Cursor 

…hem in chat

- Add ToolCallEntry type to WidgetMessage for persisting tool call history
- Add appendToolCallToMessage store action
- Store each tool call label when tool-call events arrive during streaming
- Render persisted tool calls with wrench icon in conversation messages
- Tool calls now visible both during streaming (shimmer) and after completion
@github-actions github-actions bot added the contributor:verified Contributor passed trust analysis. label Mar 20, 2026
Tool calls were rendered above the message body, so long replies pushed
them off-screen when scrolling to the latest text. Slightly increase
contrast (text-xs text-zinc-400).
@homanp homanp closed this Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:verified Contributor passed trust analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants