Skip to content

Share one chat session between the AI Mode overlay and the notebook panel - #1117

Open
yattias wants to merge 1 commit into
ai-mode-workspace/detail-blocksfrom
ai-mode-workspace/chat-session
Open

yattias wants to merge 1 commit into
ai-mode-workspace/detail-blocksfrom
ai-mode-workspace/chat-session

Conversation

…anel

useAIModeChat and AgentChatPanel each carried a copy of the same
machinery: create the chat on the first send, queue that first message
until the chat is live, keep a draft per chat across switches and failed
sends, wire model selection, tell the listing when a turn settles, and
word the composer's failure notices. hooks/useChatSession now holds it
once, keyed by `transport:chat`, and both surfaces sit on top of it;
components/AgentChat/chatNotices.ts holds the copy, with a policy for
what a surface calls a chat and who announces a spent budget.

Along the way: the queued first message is bound to the chat it was
queued for instead of firing on whichever chat is selected next; the
"new" draft no longer collides across scopes; the notebook composer now
clears on send and restores the text on failure, as the overlay always
did; and the overlay's composer takes the panel's fuller busy/stop
rules. Transports are handed out by getChatTransport so a scope always
gets the same object, and createChat takes a ChatCreateInit ready for
the fields a workspace conversation starts with.

Verified with type-check, eslint and prettier only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@yattias
yattias requested a review from a team as a code owner September 22, 2026 01:22
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
web Ready Ready Preview Sep 22, 2026 1:22am UTC

Request Review

@sonarqubecloud

Copy link
Copy Markdown

This branch was successfully deployed

1 active deployment
Preview — d13aa1e5 Deployed Sep 22, 2026 by vercel[bot]
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