Skip to content

Revert bad model picker changes#309648

Merged
roblourens merged 1 commit intomainfrom
roblou/empirical-constrictor
Apr 13, 2026
Merged

Revert bad model picker changes#309648
roblourens merged 1 commit intomainfrom
roblou/empirical-constrictor

Conversation

@roblourens
Copy link
Copy Markdown
Member

From #309331

Co-authored-by: Copilot copilot@github.com

From #309331

Co-authored-by: Copilot <copilot@github.com>
@roblourens roblourens enabled auto-merge (squash) April 13, 2026 22:20
Copilot AI review requested due to automatic review settings April 13, 2026 22:20
@roblourens roblourens self-assigned this Apr 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 083e1db4 Current: 6b9d45e4

Changed (4)

chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTabScrolled/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after
agentSessionsViewer/NeedsInput/Light
Before After
before after

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Reverts the “model picker owns model state via sessions/providers” approach from #309331 by reintroducing local persistence for the sessions window model picker and pushing that selection into the active session/provider.

Changes:

  • Add IStorageService usage to persist the local model picker’s selected model id.
  • Initialize the picker from stored state (or first available model) and push selection into the active session/provider.
  • Refactor getAvailableModels to read the active session from ISessionsManagementService.
Show a summary per file
File Description
src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsActions.ts Reintroduces local model selection persistence for the sessions window model picker and updates how selection is initialized/applied.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsActions.ts:264

  • The autorun reads currentModel, so it will fire on both session changes and model changes. Since delegate.setModel already calls provider.setModel(...), this can result in duplicate setModel calls (and for some providers, duplicate dispatch/network work). Consider making this reaction depend only on activeSession changes (e.g., avoid tracking currentModel here) or dedupe by tracking the last (sessionId, modelId) pushed.
				// When the active session changes, push the selected model to the new session
				disposableStore.add(autorun(reader => {
					const session = sessionsManagementService.activeSession.read(reader);
					const model = currentModel.read(reader);
					if (session && model) {
						const provider = sessionsProvidersService.getProviders().find(p => p.id === session.providerId);
						provider?.setModel(session.sessionId, model.identifier);
					}
  • Files reviewed: 1/1 changed files
  • Comments generated: 1

@roblourens roblourens merged commit ff85300 into main Apr 13, 2026
30 checks passed
@roblourens roblourens deleted the roblou/empirical-constrictor branch April 13, 2026 22:43
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 13, 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