Start reducing use of chatSessionType#273588
Merged
mjbvz merged 1 commit intomicrosoft:mainfrom Oct 27, 2025
Merged
Conversation
We should be able to use the resource for this instead
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the chat sessions service to remove the chatSessionType parameter from several methods, relying instead on the session resource's URI scheme. This simplifies the API by reducing redundant parameters since the session type can be derived from the resource itself.
Key changes:
- Removes
chatSessionTypeparameter from session option methods and callbacks - Introduces
SessionOptionsChangedCallbacktype alias for cleaner type definitions - Updates all call sites to use the simplified API
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/common/chatSessionsService.ts |
Defines SessionOptionsChangedCallback type and removes chatSessionType from interface method signatures |
src/vs/workbench/contrib/chat/browser/chatSessions.contribution.ts |
Updates service implementation to remove chatSessionType parameter from option-related methods |
src/vs/workbench/contrib/chat/browser/chatInputPart.ts |
Updates call sites to remove chatSessionType argument when calling session option methods |
src/vs/workbench/api/browser/mainThreadChatSessions.ts |
Derives session type from sessionResource.scheme instead of using separate parameter |
src/vs/workbench/contrib/chat/test/common/mockChatSessionsService.ts |
Updates mock implementation to match new interface signatures |
DonJayamanne
approved these changes
Oct 27, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We should be able to use the resource for this instead