From cd2ec807560826137f004e04e6dcd304261dc82d Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 07:29:36 +0000 Subject: [PATCH] fix(vscode): re-fetch merged config after settings update to prevent revert After updating global config, the extension was sending back the global-only config response to the webview. This replaced the full merged config (which includes project-level values) with only global values, causing settings UI controls to flicker and revert to their previous state. Now re-fetches the complete merged config via config.get() after the global update succeeds, ensuring the webview always has the properly resolved config from all layers. Fixes #7202 --- packages/kilo-vscode/src/KiloProvider.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/kilo-vscode/src/KiloProvider.ts b/packages/kilo-vscode/src/KiloProvider.ts index d91c1769fef..510481e8cc9 100644 --- a/packages/kilo-vscode/src/KiloProvider.ts +++ b/packages/kilo-vscode/src/KiloProvider.ts @@ -1598,13 +1598,20 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper } try { - const { data: updated } = await this.client.global.config.update({ config: partial }, { throwOnError: true }) + await this.client.global.config.update({ config: partial }, { throwOnError: true }) + + // Re-fetch the full merged config (global + project + all layers) so the + // webview receives the complete resolved config, not just global-only data. + // Without this, the global-only response would overwrite project-level + // values in the webview, causing settings to flicker and revert. + const dir = this.getWorkspaceDirectory() + const { data: merged } = await this.client.config.get({ directory: dir }, { throwOnError: true }) const message = { type: "configUpdated", - config: updated, + config: merged, } - this.cachedConfigMessage = { type: "configLoaded", config: updated } + this.cachedConfigMessage = { type: "configLoaded", config: merged } this.postMessage(message) } catch (error) { console.error("[Kilo New] KiloProvider: Failed to update config:", error)