feat(vcs): option to open diffs in a separate window (#4853)

Adds Settings > Version Control > Confirmation > Open diff as editor tab (default on, client-side workflow setting vcs.diffAsEditorTab). When off, diffs opened from the Commit tool window, history, log and Compare show in a separate Diff window; combined multi-file diffs still open as a tab.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-20 23:17:37 +08:00
1 джерело 3ec631f0c0
коміт ba6ccaf9b2
9 files changed
+40 -1

No files matched your search

+6 -1
Переглянути файл
@@ -209,7 +209,12 @@ export const opensDiffOnActivate = () => {
* (`vcs.openDiff`, with review comments) call openDiff directly.
*/
export async function openVcsDiff(data: DiffData, opts: { preview?: boolean; focus?: boolean } = {}) {
if (!vcsDiffInFront()) return openDiff(data, opts);
if (!vcsDiffInFront()) {
// Settings › Version Control › Confirmation: "Open diff as editor tab" off.
if (workflowSettings().vcs.diffAsEditorTab || combinedOf(data)) return openDiff(data, opts);
const { showDiffWindow } = await import("./DiffWindow");
return showDiffWindow(data, () => void openDiff(data, opts));
}
const { openDiffDialog } = await import("./diffDialog");
openDiffDialog(data);
}