Skip to content

chat: Reveal current Agent Host session in Agents Window - #334934

Merged
Alexandru Dima (alexdima) merged 2 commits into
release/1.137from
alexd/open-in-agents-reveal-session
Sep 7, 2026
Merged

chat: Reveal current Agent Host session in Agents Window#334934
Alexandru Dima (alexdima) merged 2 commits into
release/1.137from
alexd/open-in-agents-reveal-session

Conversation

@alexdima

@alexdima Alexandru Dima (alexdima) commented Sep 7, 2026

Copy link
Copy Markdown
Member

Summary

  • reveal the current persisted local Agent Host session when the title bar Open in Agents action is invoked
  • begin the existing-session handoff as soon as initial UI restoration starts, avoiding the deferred 2–5 second Eventually lifecycle wait
  • preserve the existing new-session behavior for untitled, remote, non-Agent-Host, and absent sessions
  • gate the behavior behind the experiment-controllable chat.experimental.openInAgentsWindow.revealCurrentSession setting, defaulting to false

Testing

  • npm run transpile-client
  • npm run eslint -- src/vs/workbench/contrib/chat/common/constants.ts src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts src/vs/workbench/contrib/chat/electron-browser/agentSessions/agentSessionsActions.ts src/vs/workbench/contrib/chat/test/electron-browser/agentSessionsActions.test.ts
  • npm run eslint -- src/vs/sessions/contrib/chat/electron-browser/chat.contribution.ts
  • scripts/test.sh --runGlob "**/workbench/contrib/chat/test/electron-browser/agentSessionsActions.test.js"

npm run typecheck-client is currently blocked by existing Agent Host SDK declaration mismatches in untouched files.

When enabled by the experimental setting, make the title bar Open in Agents action reveal the current persisted local Agent Host session. Preserve the new-session fallback for all other cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 7, 2026 15:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused, gated change preserves fallback behavior and has targeted test coverage.

Review tier: Balanced
Findings: None

What changed in this PR

Adds experiment-gated routing so the title-bar Open in Agents action reveals the current persisted local Agent Host session while retaining existing fallback behavior.

Changes:

  • Registers a disabled-by-default experimental setting.
  • Routes eligible sessions to the Agents Window.
  • Tests enabled, disabled, untitled, remote, regular, and absent-session cases.
File Description
constants.ts Defines the configuration key.
chat.shared.contribution.ts Registers the experimental setting.
agentSessionsActions.ts Implements session-aware routing.
agentSessionsActions.test.ts Covers routing and fallback behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Start resolving an existing-session handoff as soon as initial UI restore begins instead of waiting for the deferred Eventually lifecycle phase.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@alexdima
Alexandru Dima (alexdima) merged commit e9fc1f2 into release/1.137 Sep 7, 2026
30 checks passed
@alexdima
Alexandru Dima (alexdima) deleted the alexd/open-in-agents-reveal-session branch September 7, 2026 21:32
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 7, 2026
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.

3 participants