feat(vscode): scope thinking effort to the current session#1951
Merged
Conversation
|
commit: |
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.
Related Issue
No linked issue — the problem is explained below. This ports the TUI's thinking-effort rules from #1933 (and the switch warning from #1763 / web #1940) to the VS Code extension so both surfaces behave the same.
Problem
The VS Code extension persisted every concrete thinking effort pick to the global
config.toml, including a model's highest declared tier (e.g.max). A top-tier pick therefore became the global default for every future session, and re-confirming the already-active effort rewrote the config on every click. The TUI has already moved to session-scoped behavior: the top tier is session-only, only the boolean thinking toggle is persisted for it, and unchanged picks skip the write entirely.What changed
config.handler.ts): the[thinking]config patch now follows the same rules as the TUI'sthinkingEffortToConfig—offpersistsenabled: false,onpersists onlyenabled: true, and a concrete effort equal to the model's top declaredsupport_effortsentry persists onlyenabled: true(session-only tier, applied to the live session viasetThinkingas before); lower tiers persist as the global default; unknown model metadata keeps the concrete effort.saveConfigreloads the config and skips the write when nothing changed.effortChangedflag on thesaveConfigbridge message (defaults to true, wire-compatible); when false, only the model and the boolean toggle are persisted, leaving the stored effort preference (including a hand-writtenconfig.tomlvalue) untouched. Selecting the already-active effort in the webview now returns early without any write.settings.store.ts): a top-tier pick is no longer cached as the configured-effort seed used when switching models.default_effort; the one-shot persisted-max→highmigration from feat: scope thinking effort to the current session #1933 lives in agent-core and applies here unchanged.Checklist
saveConfigpersistence rules inbridge-handler.test.ts; webview store rules insettings-store.test.ts)gen-changesetsskill, or this PR needs no changeset. (VS Code extension only; the app is versioned by its own release chore, per recent vscode-only PRs.)gen-docsskill, or this PR needs no doc update.