feat(editor): Changes view mode — in-tab HEAD-vs-working-tree diff (#1353)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Brennan Benson
2026-05-03 16:17:07 -07:00
committed by GitHub
co-authored by Orca
parent 7edcdca699
commit eaebd08ff9
20 changed files with 639 additions and 118 deletions
+7 -2
View File
@@ -146,8 +146,13 @@ export class GitHandler {
if (rel.startsWith('..') || path.isAbsolute(rel)) {
throw new Error(`Path "${filePath}" resolves outside the worktree`)
}
const staged = params.staged as boolean
return computeDiff(this.gitBuffer.bind(this), worktreePath, filePath, staged)
return computeDiff(
this.gitBuffer.bind(this),
worktreePath,
filePath,
params.staged as boolean,
params.compareAgainstHead as boolean | undefined
)
}
private async stage(params: Record<string, unknown>) {