Skip to content

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

Merged
yattias merged 1 commit into
mainfrom
ai-mode-workspace/chat-session
Oct 8, 2026
Merged

yattias merged 1 commit into
mainfrom
ai-mode-workspace/chat-session

Conversation

@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 Oct 8, 2026 2:47pm UTC

Request Review

…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 force-pushed the ai-mode-workspace/detail-blocks branch from fcbb843 to ddac2b8 Compare October 8, 2026 14:46
@yattias
yattias force-pushed the ai-mode-workspace/chat-session branch from d13aa1e to 39ac97b Compare October 8, 2026 14:46
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@yattias
yattias removed this pull request from stack #1146 October 8, 2026 15:07
Base automatically changed from ai-mode-workspace/detail-blocks to main October 8, 2026 15:29
@yattias
yattias merged commit 39ac97b into main Oct 8, 2026
2 of 3 checks passed
@yattias
yattias deleted the ai-mode-workspace/chat-session branch October 8, 2026 15:29

This branch was successfully deployed

1 active deployment
Preview — 39ac97bc Deployed Oct 8, 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