A2: Compare with Disk as a UI command (editor.compareWithDisk)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-11-08 12:26:51 +01:00
parent d2344bf216
commit 59313f3f62
6 changed files with 47 additions and 4 deletions

View file

@ -20,7 +20,7 @@ import { onBeforeUnmount, onMounted } from "vue";
import { useCommandsStore } from "../../commands/store";
import { t } from "../../i18n";
import { useEditorStore } from "../../stores/editor";
import { useDiskConflictsStore } from "../../stores/diskConflicts";
import { COMPARE_WITH_DISK_COMMAND, useDiskConflictsStore } from "../../stores/diskConflicts";
import ClosePrompt from "./ClosePrompt.vue";
import EditorPane from "./EditorPane.vue";
import { provideTabCommands } from "./tabs/commands";
@ -47,6 +47,7 @@ onMounted(() => {
commands.provide("file.saveAll", { run: () => editor.saveAll(), enabled: () => editor.tabs.length > 0 }),
commands.provide("buffer.close", { run: () => editor.requestClose(), enabled: hasActive }),
commands.provide(REVEAL_COMMAND, { run: (params) => reveal(editor, params) }),
commands.provide(COMPARE_WITH_DISK_COMMAND, { run: (params) => disk.compareCommand(params), enabled: hasActive }),
commands.provide(assist.COMPLETE_COMMAND, { run: assist.completeAtCursor, enabled: assist.assistEnabled }),
commands.provide(assist.QUICK_DOC_COMMAND, { run: assist.quickDocumentation, enabled: assist.assistEnabled }),
commands.provide(assist.PARAMETER_INFO_COMMAND, { run: assist.parameterInfo, enabled: assist.assistEnabled }),