Simplify experience for no auto model#321199
Draft
pwang347 wants to merge 5 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
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
showAutoModelfrom 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
_sendno longer checksoptions.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
Contributor
|
Base:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.