fix(vscode): persist false agent toggle values#7835
fix(vscode): persist false agent toggle values#7835sainzs wants to merge 5 commits intoKilo-Org:mainfrom
Conversation
|
Verification completed locally:
|
Code Review SummaryStatus: 1 Issues Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Other Observations (not in diff)Previous Files Reviewed (12 files)
Reviewed by gpt-5.4-20260305 · 824,020 tokens |
Follow-up for Kilo-Org#7833
|
Follow-up from review is now addressed. Added the missing clear path for
Verification re-run locally:
|
| this.pending++ | ||
| try { | ||
| await this.client.global.config.update({ config: partial }, { throwOnError: true }) | ||
| await this.client.global.config.update({ config: partial as Config }, { throwOnError: true }) |
There was a problem hiding this comment.
WARNING: The SDK contract is still stale for default_agent
This cast fixes the VS Code caller, but packages/sdk/js/src/v2/gen/types.gen.ts still exposes default_agent?: string, so any other SDK consumer remains unable to clear the field with null. Since this PR changes the API contract, the generated SDK should be regenerated instead of relying on a local cast here.
Follow-up for Kilo-Org#7835 bot review
|
Addressed the SDK/openapi follow-up from the bot review. Updated the public contract so
That lets Verification after the contract update:
|
Follow-up hardening for Kilo-Org#7835
|
Parallel quality pass completed. I ran three independent sub-agent audits on the current branch:
Added follow-up regression coverage for:
Verification after the hardening pass:
|
|
Follow-up quality pass is pushed in Addressed from the audit pass:
Verification run on this follow-up:
Sub-agent findings that surfaced real issues were addressed before push; the remaining contract review came back clean. |
| .number() | ||
| .int() | ||
| .positive() | ||
| .nullable() |
There was a problem hiding this comment.
WARNING: steps: null is still dropped before the config is applied
Making the schema nullable here updates the contract, but the Agent transform a few lines below still does const steps = agent.steps ?? agent.maxSteps. When the webview sends steps: null to clear an override, that expression turns it into undefined, so the delete sentinel never reaches config merging and the old step limit remains.
Context
Fixes
#7833.The Agents Behavior settings screen could turn
DisableorHideon for an agent, but turning either toggle back off would not persist after Save. The root cause was that the webview encoded the "off" state asundefined, which gets omitted from the saved config patch, so a previously savedtruewas never overwritten.Implementation
Updated
packages/kilo-vscode/webview-ui/src/components/settings/ModeEditView.tsxso the Hide and Disable toggles write explicit boolean values instead of collapsingfalsetoundefined.Also added regression tests in
packages/kilo-vscode/tests/unit/config-utils.test.tsto verify nested agent config preserves explicitfalsevalues through the same config-merge path used by the settings draft state.Screenshots
How to Test
Settings > Agents Behavior > Agents.HiddenorDisable, then save.bun test --cwd packages/kilo-vscode tests/unit/config-utils.test.ts.Get in Touch
Discord: add your handle here if you want maintainer follow-up there.