Skip to content

Keep user-opened tools expanded across streaming updates - #743

Open
draxxris wants to merge 1 commit into
agegr:mainfrom
draxxris:tool-expand
Open

Keep user-opened tools expanded across streaming updates#743
draxxris wants to merge 1 commit into
agegr:mainfrom
draxxris:tool-expand

Conversation

@draxxris

@draxxris draxxris commented Sep 6, 2026

Copy link
Copy Markdown

Currently user can open tools/thinking blocks, but when a new streaming event comes in, the blocks are closed.

This PR keeps them open.

Lift expanded state from ToolCallBlock's local useState to a chat-level
Set keyed by toolCallId (fallback to entry/stream index). The local
state was tied to the component instance and reset on every streaming
delta and when a streamed tool was promoted to history via loadSession,
causing an open tool to collapse on each new LLM line. A session-scoped
map in ChatWindow now survives re-renders and the stream → history
transition, and is cleared on session change.
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.

1 participant