Remove last-used session type and agent logic#323555
Merged
Merged
Conversation
* 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
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the “last-used editor session type (agent)” plumbing from the chat editor opening flow by deleting the associated storage key + resolver helpers, and by dropping the corresponding storage reads/writes in the editor input and widget service. It also removes tests that only covered that last-used behavior.
Changes:
- Deleted
ChatLastUsedEditorSessionTypeStorageKeyand thegetNewChatEditorSessionType/getNewChatEditorSessionResourcehelpers fromchat/common/constants.ts. - Removed storage-backed “remember last-used non-local agent for new chat editor” logic from
ChatEditorInput,ChatWidgetService, and the “new chat” action URI helper. - Removed chat input logic that seeded the draft state’s selected model from a per-session-type persisted selection.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/common/constants.test.ts | Removes unit tests for the deleted “last-used session type” resolver logic. |
| src/vs/workbench/contrib/chat/common/constants.ts | Deletes last-used session type storage key and resolver helpers. |
| src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.ts | Stops reading last-used session type from profile storage when creating a default/untitled chat editor session. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts | Removes draft-state seeding from a per-session-type persisted model selection. |
| src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.ts | Stops persisting last-focused non-local session type into profile storage. |
| src/vs/workbench/contrib/chat/browser/actions/chatActions.ts | Switches “new chat editor URI” logic to use the default session resource directly (no last-used storage). |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 1
- Review effort level: Low
justschen
approved these changes
Jun 29, 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.
Eliminate the last-used session type logic and related dependencies from the chat editor input, streamlining the codebase and improving maintainability. This change also removes unnecessary storage service references.
Part of #323484