mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-07 15:26:49 +01:00
01cb792966
Replace the per-provider model picker actions with a single sessions-core ModelPicker that wraps the shared workbench ModelPickerActionItem. The core picker reads the available models from the active session's provider via the new ISessionsProvider.getModels API, remembers the last used model per provider per session type, and applies the selection through ISessionsProvider.setModel. Providers stay authoritative for their own behavior: - getModels resolves model metadata per provider (local/CLI/agent-host filter registered language models; cloud synthesizes metadata from its option group). - getModelPickerOptions lets each provider decide grouping, featured models and whether the Manage Models action is shown, instead of core branching on session type. - onDidChangeModels lets the core picker refresh when models change. Decouple the core picker from agent-host provider identity: the agent-host mobile combined config picker now publishes the neutral ActiveSessionUsesCombinedConfigPickerContext key, which the core picker uses to gate itself out on phone layouts. Add architecture guidelines: do not mirror runtime state into context keys, delegate provider-specific decisions to the provider, and avoid large mid-method comments. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>