Skip to content

Remove last-used session type and agent logic#323484

Merged
DonJayamanne merged 3 commits into
mainfrom
don/revert-agent-selection
Jun 29, 2026
Merged

Remove last-used session type and agent logic#323484
DonJayamanne merged 3 commits into
mainfrom
don/revert-agent-selection

Conversation

@DonJayamanne

Copy link
Copy Markdown
Contributor

Revert chagnes related to #322792

Copilot AI review requested due to automatic review settings June 29, 2026 12:58
@DonJayamanne DonJayamanne self-assigned this Jun 29, 2026
@DonJayamanne DonJayamanne changed the title Remove last-used session type logic Remove last-used session type and agent logic Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/getNewChatEditorSessionResource helpers.
  • 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

Comment thread src/vs/workbench/contrib/chat/common/constants.ts
@DonJayamanne DonJayamanne marked this pull request as ready for review June 29, 2026 13:25
@DonJayamanne DonJayamanne enabled auto-merge (squash) June 29, 2026 13:25
@DonJayamanne DonJayamanne merged commit b802a62 into main Jun 29, 2026
29 checks passed
@DonJayamanne DonJayamanne deleted the don/revert-agent-selection branch June 29, 2026 13:29
@vs-code-engineering vs-code-engineering Bot added this to the 1.128.0 milestone 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
kycutler pushed a commit that referenced this pull request Jul 7, 2026
…#324826)

* cherry-pick b802a62

* signing commit

* Fix test

* Revert PR #324669

* Revert "Revert PR #324669"

This reverts commit d97c4e5.

* Preserve explicit local chat session branch

* Remove IStorageService

---------

Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>
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.

3 participants