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

+1
Переглянути файл
@@ -94,6 +94,7 @@ export const CLIENT_SETTINGS_KEYS = [
"run.pinTabs",
"externalDiff",
"vcs.showDirtyDirectories",
"vcs.diffAsEditorTab",
"vcs.git.inlineBlame",
"vcs.git.inlineBlameClickable",
"vcs.git.showBranchInProjectView",
+2
Переглянути файл
@@ -1,4 +1,6 @@
{
"Open diff as editor tab": "Open diff as editor tab",
"When off, diffs you open (changes, history, Compare) show in a separate window.": "When off, diffs you open (changes, history, Compare) show in a separate window.",
"Plain-text word lists (one word per line) or Hunspell .dic files; a .dic with its .aff beside it also accepts the inflected forms and compounds its rules allow. Relative paths resolve against the project root, ~/ against the home folder.": "Plain-text word lists (one word per line) or Hunspell .dic files; a .dic with its .aff beside it also accepts the inflected forms and compounds its rules allow. Relative paths resolve against the project root, ~/ against the home folder.",
"Trust Folder": "Trust Folder",
"No files selected": "No files selected",
+2
Переглянути файл
@@ -1,4 +1,6 @@
{
"Open diff as editor tab": "以编辑器标签页打开差异",
"When off, diffs you open (changes, history, Compare) show in a separate window.": "关闭后,打开的差异(更改、历史记录、比较)会显示在单独的窗口中。",
"Plain-text word lists (one word per line) or Hunspell .dic files; a .dic with its .aff beside it also accepts the inflected forms and compounds its rules allow. Relative paths resolve against the project root, ~/ against the home folder.": "纯文本单词列表(每行一个词)或 Hunspell .dic 文件;旁边有同名 .aff 的 .dic 还会接受其规则允许的变形和复合词。相对路径基于项目根目录解析,~/ 表示主目录。",
"MCP server instructions": "MCP 服务器说明",
"MCP tools (deferred)": "MCP 工具(延迟加载)",
+4
Переглянути файл
@@ -76,6 +76,8 @@ export interface CommitSettingsValid {
export interface VcsSettingsValid {
showDirtyDirectories: boolean;
/** Off: diffs the user opens show in a separate window. */
diffAsEditorTab: boolean;
limitHistory: boolean;
historyLimit: number;
git: GitSettingsValid;
@@ -274,6 +276,7 @@ export const DEFAULT_WORKFLOW: WorkflowSettings = {
vcs: {
// IDEA's VcsConfiguration.SHOW_DIRTY_RECURSIVELY is off by default.
showDirtyDirectories: false,
diffAsEditorTab: true,
limitHistory: true,
historyLimit: 1000,
git: {
@@ -448,6 +451,7 @@ export function validateVcs(raw: unknown): VcsSettingsValid {
const confirm = ["ask", "silently", "never"] as const;
return {
showDirtyDirectories: bool(v.showDirtyDirectories, d.showDirtyDirectories),
diffAsEditorTab: bool(v.diffAsEditorTab, d.diffAsEditorTab),
limitHistory: bool(v.limitHistory, d.limitHistory),
historyLimit: num(v.historyLimit, d.historyLimit, L.historyLimit, true),
git: {