Skip to content

🤖 feat: persist explicit AI-setting changes from the VS Code webview #4781

Description

@ThomasK33

Problem

The VS Code webview never saves AI-setting changes to the workspace. Sends pass skipAiSettingsPersistence: true (#4765), and a model change stays local. After #4778 the webview loads each workspace's real settings, but a user's explicit model, thinking or agent choice made in the webview still does not carry over to the desktop app or to later sessions.

Turning persistence on safely needs the desktop's send-path handling. Codex review of #4778 listed what is missing:

  • Selection intent for sub-agent workspaces: getAiSelectionIntentForSendOptions, with the tokens consumed after a successful send, so deliberate picks update taskAiPins.
  • Gateway routes: persist a gateway-preserving model (normalizeSelectedModel), not the canonical direct-provider ID.
  • Unclamped thinking: persist the selected thinking level as is; the backend applies the configured floor.
  • Write order: serialize or supersede updateAgentAISettings writes so rapid picks persist in selection order.

Proposed fix

Reuse the desktop's send-options and selection-intent helpers in the webview composer, rather than copying their logic, and enable persistence only for workspaces with loaded settings.

Refs #4738


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $26.99

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions