Skip to content

Remove last-used session type and agent logic#323555

Merged
DonJayamanne merged 1 commit into
release/1.127from
don/revert-agent-selection-release
Jun 29, 2026
Merged

Remove last-used session type and agent logic#323555
DonJayamanne merged 1 commit into
release/1.127from
don/revert-agent-selection-release

Conversation

@DonJayamanne

Copy link
Copy Markdown
Contributor

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

* 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
Copilot AI review requested due to automatic review settings June 29, 2026 17:32
@DonJayamanne DonJayamanne self-assigned this Jun 29, 2026
@DonJayamanne DonJayamanne marked this pull request as ready for review June 29, 2026 17:35
@DonJayamanne DonJayamanne enabled auto-merge (squash) June 29, 2026 17:35

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 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 ChatLastUsedEditorSessionTypeStorageKey and the getNewChatEditorSessionType / getNewChatEditorSessionResource helpers from chat/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

Comment thread src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts
@DonJayamanne DonJayamanne merged commit cfbbd2b into release/1.127 Jun 29, 2026
30 checks passed
@DonJayamanne DonJayamanne deleted the don/revert-agent-selection-release branch June 29, 2026 17:55
@vs-code-engineering vs-code-engineering Bot added this to the 1.127.0 milestone Jun 29, 2026
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