Skip to content

move ready state to session object#309786

Merged
sandy081 merged 2 commits intomainfrom
sandy081/unique-elephant
Apr 14, 2026
Merged

move ready state to session object#309786
sandy081 merged 2 commits intomainfrom
sandy081/unique-elephant

Conversation

@sandy081
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 14, 2026 09:15
@sandy081 sandy081 enabled auto-merge (squash) April 14, 2026 09:15
@sandy081 sandy081 self-assigned this Apr 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR moves “session readiness” (whether the active session can accept/send requests) onto the ISession model as an observable, so UI components don’t need to query agent-host providers directly for config readiness.

Changes:

  • Add ISession.ready: IObservable<boolean> to the sessions model.
  • Plumb ready through session providers (local agent host, remote agent host, Copilot sessions) and test session factories.
  • Update the “new chat” welcome UI to enable/disable Send based on activeSession.ready instead of provider config watchers.
Show a summary per file
File Description
src/vs/sessions/services/sessions/common/session.ts Adds ready observable to ISession.
src/vs/sessions/contrib/chat/browser/newChatViewPane.ts Switches Send button enablement logic to use activeSession.ready.
src/vs/sessions/contrib/localAgentHost/browser/localAgentHostSessionsProvider.ts Adds and updates a ready observable for local agent-host sessions based on session config readiness.
src/vs/sessions/contrib/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts Adds and updates a ready observable for remote agent-host sessions based on session config readiness.
src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsProvider.ts Sets ready to always-true for Copilot chat sessions.
src/vs/sessions/contrib/chat/test/browser/sessionsConfigurationService.test.ts Updates test session factory to include ready.
src/vs/sessions/contrib/terminal/test/browser/sessionsTerminalContribution.test.ts Updates test session factories to include ready.
src/vs/sessions/contrib/sessions/test/browser/sessionsListModelService.test.ts Updates test session factory to include ready.
src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts Updates test session factory to include ready.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 1

@sandy081 sandy081 merged commit 320f7fc into main Apr 14, 2026
26 checks passed
@sandy081 sandy081 deleted the sandy081/unique-elephant branch April 14, 2026 10:11
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 14, 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.

4 participants