Remove last-used session type and agent logic#323484
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes/reverts recently added “last-used session type (agent)” and “remember last-used model per session type” behavior in the workbench chat editor flow, aligning new-chat creation back to using the configured/default session type resolution (related to #322792).
Changes:
- Removes the persisted “last-used editor session type” storage key and the
getNewChatEditorSessionType/getNewChatEditorSessionResourcehelpers. - Removes logic/tests that record and restore a “default model per session type” selection.
- Updates chat actions/widget focus handling to stop persisting last-used session type/model and to use
getDefaultNewChatSessionResource(...)for new editors.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/common/constants.test.ts | Removes tests/imports for last-used session type resolution. |
| src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelSelectionLogic.test.ts | Removes tests for session-type default-model recording logic. |
| src/vs/workbench/contrib/chat/common/constants.ts | Removes last-used session type storage key and “new editor session resource” helpers. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.ts | Removes helper deciding whether to record a session-type default model. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts | Removes restore/record of per-session-type remembered model selection. |
| src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.ts | Removes focus-based persistence of last-used session type/model. |
| src/vs/workbench/contrib/chat/browser/actions/chatActions.ts | Switches new-editor URI creation to getDefaultNewChatSessionResource(...). |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Low
aiday-mar
approved these changes
Jun 29, 2026
DonJayamanne
added a commit
that referenced
this pull request
Jun 29, 2026
Remove last-used session type and agent logic (#323484) * remove last-used session type logic and related tests * refactor: remove last-used session type logic from chat editor input * refactor: remove unused storage service dependency from ChatEditorInput
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.
Revert chagnes related to #322792