Skip to content

fix: persist chat settings to config.yaml, not unregistered VS Code keys - #124

Open
hellodk wants to merge 1 commit into
masterfrom
fix/save-settings-yaml
Open

fix: persist chat settings to config.yaml, not unregistered VS Code keys#124
hellodk wants to merge 1 commit into
masterfrom
fix/save-settings-yaml

Conversation

@hellodk

@hellodk hellodk commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Problem

The in-webview settings overlay and Add-Model dialogue posted a saveSettings
message whose host handler wrote champ.provider and champ.<provider>.model/
baseUrl to VS Code global settings. Those keys were removed from package.json
in the YAML-only migration (#118), so any interaction surfaced:

Unable to write to User Settings because champ.provider is not a registered configuration.

Fix

saveSettings now writes the provider/model/baseUrl block into
.champ/config.yaml (workspace, or ~/.champ fallback) via
upsertProviderInYaml with setActive, then reloads. It no longer touches VS
Code settings for provider/model/baseUrl.

Tests

  • 2 new unit tests in test/unit/ui/chat-view-provider.test.ts
  • Full suite: 1745 passed, 5 skipped
  • check-types clean, lint 0 errors (3 pre-existing warnings)

Closes #123

The in-webview settings overlay and Add-Model dialogue posted a
saveSettings message whose host handler wrote champ.provider and
champ.<provider>.model/baseUrl to VS Code global settings. Those keys
were removed from package.json in the YAML-only migration (#118), so any
interaction surfaced "Unable to write to User Settings because
champ.provider is not a registered configuration."

saveSettings now writes the provider/model/baseUrl block into
.champ/config.yaml (workspace or ~/.champ fallback) via upsertProviderInYaml
with setActive, then reloads — never touching VS Code settings.

Closes #123
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.

saveSettings writes unregistered champ.provider keys — 'Unable to write to User Settings' error

1 participant