Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/project-snapshot-settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---

Persist the Checkpoints setting per project so disabling snapshots remains effective after restarting VS Code.
7 changes: 7 additions & 0 deletions packages/kilo-vscode/tests/unit/config-scope.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
6 changes: 3 additions & 3 deletions packages/kilo-vscode/webview-ui/src/utils/config-scope.ts
Original file line number Diff line number Diff line change
@@ -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<string> = 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<string> = new Set(["commit_message", "snapshot"])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Consider cleaning up the stale global snapshot value written by the old code path

Users who disabled Checkpoints before this fix already have snapshot: false persisted in their global config. After this change, the Checkpoints toggle only ever writes project scope, so:

  • Re-enabling snapshots in one project writes snapshot: true to that project's config, but the stale global snapshot: false keeps snapshots disabled in every other project.
  • There is no Settings UI path to unset the global key (the toggle now routes exclusively to project scope), so affected users can only fix it per-project or by hand-editing the global config file.

Not blocking — the per-project toggle self-heals each workspace — but you may want to also send a global unset for snapshot when saving the project-scoped value, or do a one-time cleanup on load.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

export function splitConfigByScope(draft: Partial<Config>) {
const global: Record<string, unknown> = {}
const project: Record<string, unknown> = {}
Expand Down
Loading