Skip to content

Simplify experience for no auto model#321199

Draft
pwang347 wants to merge 5 commits into
mainfrom
pawang/simplifyAutoModelExp
Draft

Simplify experience for no auto model#321199
pwang347 wants to merge 5 commits into
mainfrom
pawang/simplifyAutoModelExp

Conversation

@pwang347

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 12, 2026 18:57

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 “no Auto model”/“no models available” empty-state path from the chat model picker and instead shifts eligibility/upgrade handling toward session-type locking (notably for Copilot Free/EDU). It also simplifies the Sessions window model-picker integration by removing the showAutoModel option plumbing across providers.

Changes:

  • Remove showAutoModel from model picker delegates/options and delete the associated empty-state behavior and tests.
  • Introduce entitlement-based locking in the session-type picker for session types that can’t produce a request for Free/EDU users (no Auto fallback + no targeted/BYOK models).
  • Simplify Sessions window send/model-picker gating logic and update Copilot session contribution metadata (supportsAutoModel).
Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelPicker.test.ts Removes tests that asserted the “no models available” empty-state when Auto is unavailable.
src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.ts Adds model-aware entitlement locking for session types; updates upgrade hover copy.
src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.ts Removes showAutoModel from the model picker delegate API.
src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.ts Wires new DI dependency through to the base session-type picker.
src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts Removes the empty-state; always inserts a synthetic “Auto” entry when the model list is empty.
src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts Removes “no usable model” send gating from context keys and related update calls.
src/vs/sessions/services/sessions/common/sessionsProvider.ts Removes showAutoModel from session model picker options.
src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts Simplifies model picker options returned by provider (drops showAutoModel).
src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts Simplifies model picker options returned by provider (drops showAutoModel).
src/vs/sessions/contrib/chat/test/browser/modelPicker.test.ts Deletes tests for sessionHasNoSelectableModel (function removed).
src/vs/sessions/contrib/chat/browser/newChatWidget.ts Removes model-based can-send gating and related reactivity wiring.
src/vs/sessions/contrib/chat/browser/newChatInSessionWidget.ts Removes model-based can-send gating and related reactivity wiring.
src/vs/sessions/contrib/chat/browser/newChatInput.ts Removes the runtime canSendRequest guard from the send path (UI still disables button).
src/vs/sessions/contrib/chat/browser/modelPicker.ts Hides/disables the picker when no models are offered; removes Auto/empty-state behavior.
extensions/copilot/package.json Marks the Cloud agent session contribution as supportsAutoModel: false.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/sessions/contrib/chat/browser/newChatInput.ts:604

  • _send no longer checks options.canSendRequest, so the Enter/sendQuery paths can still dispatch a request even when the Send button is disabled (e.g. while the session is loading). This can lead to requests being sent in a state the UI is explicitly trying to block.
	private async _send(background = false): Promise<void> {
		const rawQuery = this._editor.getModel()?.getValue() ?? '';
		const query = rawQuery.trim();
		const queryOffset = rawQuery.length - rawQuery.trimStart().length;
		const hasSendableAttachment = this._contextAttachments.attachments.some(isExplicitFileOrImageVariableEntry);
		if ((!query && !hasSendableAttachment) || this._sending) {
			return;
		}

		// Check for slash commands first
		if (query && this._slashCommandHandler?.tryExecuteSlashCommand(query)) {
			this._editor.getModel()?.setValue('');
			return;
		}
  • Files reviewed: 15/15 changed files
  • Comments generated: 2

Comment thread src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts Outdated
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Base: 8a492327 Current: 4a409ec2

No screenshot changes.

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.

2 participants