Skip to content

[Cherry-pick] Remove last-used session type and agent logic (#323484)#324826

Merged
kycutler merged 7 commits into
release/1.128from
bv/cherry-pick-323484
Jul 7, 2026
Merged

[Cherry-pick] Remove last-used session type and agent logic (#323484)#324826
kycutler merged 7 commits into
release/1.128from
bv/cherry-pick-323484

Conversation

@benvillalobos

Copy link
Copy Markdown
Member

Related: #324669

This is a cherry-pick of PR #323484 merge commit.

Context

#323914 started from a base that existed before #323484. Merge conflict resolution accidentally ended with the version prior to #323484 being accepted.

Copilot AI review requested due to automatic review settings July 7, 2026 20:00
@benvillalobos benvillalobos added the candidate Issue identified as probable candidate for fixing in the next release label Jul 7, 2026
DonJayamanne
DonJayamanne previously approved these changes Jul 7, 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 is a cherry-pick of #323484 that re-removes the "last-used editor session type / agent" logic which was accidentally reintroduced during a merge-conflict resolution in #323914. It strips the storage key and helper functions that remembered the last non-local agent, along with the code paths that consumed them across the chat editor input, chat input part, and chat widget service.

Changes:

  • Remove ChatLastUsedEditorSessionTypeStorageKey, getNewChatEditorSessionType, and getNewChatEditorSessionResource from constants.ts.
  • Drop the IStorageService-backed last-used resolution in ChatEditorInput.resolve() (falling back to getDefaultNewChatSessionResource) and remove the remembered-model seeding in ChatInputPart.
  • Remove recordLastUsedSessionType and its call sites (plus the IStorageService dependency) from ChatWidgetService.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/common/constants.ts Removes the last-used storage key and the two editor-session-type resolution helpers.
src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.ts Reverts resolve() to default-resource logic and removes the IStorageService dependency; leaves explicitSessionType plumbing and tests inconsistent/broken.
src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts Removes _getRememberedSessionTypeModel and the empty-input model seeding it drove.
src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.ts Removes recordLastUsedSessionType, its callers, and the now-unused storage imports/dependency.

The removals in constants.ts, chatInputPart.ts, and chatWidgetService.ts are clean (no orphaned references). However, in chatEditorInput.ts the revert removed the explicitSessionType branch and the IStorageService constructor parameter while chatEditorInput.test.ts still constructs the input with an extra IStorageService argument and asserts the removed resolveExplicitLocal behavior — this breaks compilation and the tests, and leaves the explicitSessionType feature only half-present.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.ts Outdated
@kycutler kycutler merged commit fc3def6 into release/1.128 Jul 7, 2026
46 of 47 checks passed
@kycutler kycutler deleted the bv/cherry-pick-323484 branch July 7, 2026 22:14
@vs-code-engineering vs-code-engineering Bot added this to the 1.128.0 milestone Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

candidate Issue identified as probable candidate for fixing in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants