sessions - allow to create new chat per repository from the section header#303266
Merged
sessions - allow to create new chat per repository from the section header#303266
Conversation
Contributor
There was a problem hiding this comment.
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 onNewChatViewPane/NewChatWidgetto 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
getSessionRepositoryUristays on the service, consider implementing it in terms of a sessionURIlookup rather than accepting anIAgentSessionobject. Resolving fromagentSessionsService.model.getSession(resource)makes the method resilient to staleIAgentSessionreferences and keeps the service API aligned with other URI-based entry points.
getSessionRepositoryUri(session: IAgentSession): URI | undefined {
const [repositoryUri] = this.getRepositoryFromMetadata(session);
return repositoryUri;
}
src/vs/sessions/contrib/sessions/browser/sessionsManagementService.ts
Outdated
Show resolved
Hide resolved
src/vs/sessions/contrib/sessions/browser/sessions.contribution.ts
Outdated
Show resolved
Hide resolved
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
previously approved these changes
Mar 19, 2026
lszomoru
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.