Skip to content

[BUG] Sync API setConfiguration through provider state wiring #982

Description

@easonLiangWorldedtech

Problem

API.setConfiguration() does not properly propagate configuration changes to the provider local state. When a user updates their API configuration (model, temperature, etc.), the change is not reflected in the running webview instance because:

  1. API.setConfiguration() was not calling the provider's setValues() method
  2. Provider state and API state were out of sync after configuration changes
  3. No test coverage existed for this critical wiring path

Solution

Wire API.setConfiguration() to call the provider's setValues() method, ensuring configuration changes propagate correctly:

  • API.setConfiguration() now calls provider setValues() to update local state
  • Added comprehensive API state wiring test covering the full propagation chain
  • No dead code: setupGlobalStateListener was intentionally not included because mode/profile changes use ContextProxy / global state, not VS Code onDidChangeConfiguration events

Scope

  • API.setConfiguration() → provider setValues() wiring
  • API test coverage for configuration propagation
  • Clarification on why setupGlobalStateListener is not shipped (mode/profile use ContextProxy/global state, not VS Code configuration events)

Tests

  • Targeted API/webview/provider tests: 152 passed

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions