Skip to content

Comments

remove creating session in beginning#296638

Merged
sandy081 merged 1 commit intomainfrom
sandy081/smiling-tortoise
Feb 20, 2026
Merged

remove creating session in beginning#296638
sandy081 merged 1 commit intomainfrom
sandy081/smiling-tortoise

Conversation

@sandy081
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 20, 2026 21:59
@sandy081 sandy081 enabled auto-merge (squash) February 20, 2026 21:59
@sandy081 sandy081 self-assigned this Feb 20, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 20, 2026
Copy link
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 removes premature session creation in the Agent Sessions window by eliminating the createNewPendingSession method and refactoring LocalNewSession and RemoteNewSession to accept a URI directly instead of an IActiveSessionItem. The change implements a fully deferred session creation pattern where chat sessions are only created when the user sends their first request.

Changes:

  • Removed createNewPendingSession method that was eagerly creating chat sessions before user interaction
  • Refactored LocalNewSession and RemoteNewSession to accept URI resources directly instead of IActiveSessionItem
  • Simplified createNewSessionForTarget to construct new session objects without creating the underlying chat session

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/vs/sessions/contrib/sessions/browser/sessionsManagementService.ts Removed createNewPendingSession method and updated createNewSessionForTarget to pass URI directly to LocalNewSession/RemoteNewSession constructors
src/vs/sessions/contrib/chat/browser/newSession.ts Updated LocalNewSession and RemoteNewSession constructors to accept URI instead of IActiveSessionItem, removed unused import, and made resource a direct property instead of deriving it from activeSessionItem

@sandy081 sandy081 merged commit 53a9e01 into main Feb 20, 2026
23 checks passed
@sandy081 sandy081 deleted the sandy081/smiling-tortoise branch February 20, 2026 23:36
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.

2 participants