Dashboard › opencode › Distillation
2e590366-ba0c-484a-9d9b-fcd0d895f2fa["lore_tm_v1_Zt3rCopsy-N_0kpyhiYHhhuSNpKnaO4ykLRheI_j_wI","lore_tm_v1_iEvbjJomHxfAjYMwczNbhGqbF_GH55zQJF00I_HkhLo"]
Date: Sep 17, 2026
packages/core/src/snapshot.ts, snapshot support is enabled only when location.vcs?.type === "git" and Config.latest(yield* config.entries(), "snapshots") !== false.Snapshot.capture calls git.tree.capture with scopes: [yield* scope()], ignores: source, and maximumUntrackedFileBytes: 2 * 1024 * 1024; capture failures are logged as "failed to capture snapshot" and converted to undefined.git.repo.create({ worktree, gitDirectory, seed: source }); creation errors are mapped through failure("capture", cause).Snapshot.files compares Git.TreeID.make(input.from) and Git.TreeID.make(input.to), obtains changed paths through git.tree.files, and, when source exists, filters paths reported by git.index.ignored({ repository: source, paths: files }).Snapshot.diff obtains changed files through git.tree.files, excludes source-repository ignored paths, and invokes git.tree.diff with context: input.context and (input.paths ?? files).filter((file) => !ignored.has(file)).[file, snapshot] entry by resolving it against worktree and checking FSUtil.contains(worktree, absolute); an escaping path produces new Error({ operation, message: \Path escapes the project: ${file}` }), while accepted snapshot IDs are converted with Git.TreeID.make(snapshot)`.Snapshot.preview rejects disabled snapshots with new Error({ operation: "preview", message: "Snapshots are disabled" }); otherwise it captures the current state only for Array.from(files.keys()) with maximumUntrackedFileBytes: 2 * 1024 * 1024, then calls git.tree.preview({ repository: repo, current, files, context: input.context }).No files found.