Skip to content

sessions - allow to create new chat per repository from the section header#303266

Merged
bpasero merged 4 commits intomainfrom
ben/due-vulture
Mar 19, 2026
Merged

sessions - allow to create new chat per repository from the section header#303266
bpasero merged 4 commits intomainfrom
ben/due-vulture

Conversation

@bpasero
Copy link
Member

@bpasero bpasero commented Mar 19, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 19, 2026 17:12
@bpasero bpasero enabled auto-merge (squash) March 19, 2026 17:12
@bpasero bpasero self-assigned this Mar 19, 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

Enables starting a new chat session for a specific repository directly from a repository section header in the Sessions view (Agent Sessions window), by switching to the New Session view and preselecting the repository.

Changes:

  • Added a sessions management service API to derive a repository URI from an agent session’s metadata.
  • Registered a new toolbar action on repository section headers to create a new session and preselect the repository.
  • Added setProject(...) plumbing on NewChatViewPane/NewChatWidget to programmatically select a project in the workspace picker.

Reviewed changes

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

File Description
src/vs/sessions/contrib/sessions/browser/sessionsManagementService.ts Exposes a helper to obtain a repository URI from an IAgentSession.
src/vs/sessions/contrib/sessions/browser/sessions.contribution.ts Adds a repository-section toolbar action that opens the New Session view and sets the project.
src/vs/sessions/contrib/chat/browser/newChatViewPane.ts Adds setProject(...) on the view/widget to preselect a project via the workspace picker.
Comments suppressed due to low confidence (1)

src/vs/sessions/contrib/sessions/browser/sessionsManagementService.ts:471

  • If getSessionRepositoryUri stays on the service, consider implementing it in terms of a session URI lookup rather than accepting an IAgentSession object. Resolving from agentSessionsService.model.getSession(resource) makes the method resilient to stale IAgentSession references and keeps the service API aligned with other URI-based entry points.
	getSessionRepositoryUri(session: IAgentSession): URI | undefined {
		const [repositoryUri] = this.getRepositoryFromMetadata(session);
		return repositoryUri;
	}

@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 19, 2026
bpasero and others added 2 commits March 19, 2026 18:29
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
dmitrivMS
dmitrivMS previously approved these changes Mar 19, 2026
@bpasero bpasero merged commit 21f384a into main Mar 19, 2026
19 checks passed
@bpasero bpasero deleted the ben/due-vulture branch March 19, 2026 19:13
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