From c35c61bc680f34917c100f747e4d18192a74e7c2 Mon Sep 17 00:00:00 2001 From: marius-kilocode Date: Tue, 18 Aug 2026 10:57:13 +0200 Subject: [PATCH] fix(vscode): persist snapshot setting per project --- .changeset/project-snapshot-settings.md | 5 +++++ packages/kilo-vscode/tests/unit/config-scope.test.ts | 7 +++++++ packages/kilo-vscode/webview-ui/src/utils/config-scope.ts | 6 +++--- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .changeset/project-snapshot-settings.md diff --git a/.changeset/project-snapshot-settings.md b/.changeset/project-snapshot-settings.md new file mode 100644 index 000000000000..a1c42df4eb79 --- /dev/null +++ b/.changeset/project-snapshot-settings.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Persist the Checkpoints setting per project so disabling snapshots remains effective after restarting VS Code. diff --git a/packages/kilo-vscode/tests/unit/config-scope.test.ts b/packages/kilo-vscode/tests/unit/config-scope.test.ts index 80bd762552d9..df5d10ea7405 100644 --- a/packages/kilo-vscode/tests/unit/config-scope.test.ts +++ b/packages/kilo-vscode/tests/unit/config-scope.test.ts @@ -2,6 +2,13 @@ import { describe, expect, it } from "bun:test" import { splitConfigByScope } from "../../webview-ui/src/utils/config-scope" describe("splitConfigByScope", () => { + it("writes snapshot configuration to project config", () => { + const split = splitConfigByScope({ snapshot: false }) + + expect(split.global).toEqual({}) + expect(split.project).toEqual({ snapshot: false }) + }) + it("keeps indexing configuration out of project config", () => { const split = splitConfigByScope({ indexing: { diff --git a/packages/kilo-vscode/webview-ui/src/utils/config-scope.ts b/packages/kilo-vscode/webview-ui/src/utils/config-scope.ts index f6fd5a73867c..8e1c9335f826 100644 --- a/packages/kilo-vscode/webview-ui/src/utils/config-scope.ts +++ b/packages/kilo-vscode/webview-ui/src/utils/config-scope.ts @@ -1,9 +1,9 @@ import type { Config } from "../types/messages" // Top-level config keys that persist to the project's kilo.json rather than the -// global one. Settings that are inherently per-repository (e.g. commit message -// conventions) belong here so they don't leak across workspaces. -const PROJECT_SCOPED_KEYS: ReadonlySet = new Set(["commit_message"]) +// global one. Settings that are inherently per-repository (e.g. snapshots and +// commit message conventions) belong here so they don't leak across workspaces. +const PROJECT_SCOPED_KEYS: ReadonlySet = new Set(["commit_message", "snapshot"]) export function splitConfigByScope(draft: Partial) { const global: Record = {} const project: Record = {}