Open files and replace the file row menu with real actions

This commit is contained in:
ZacharyZhang-NY committed 2026-05-28 22:36:31 -04:00
1 parent d2695202b5
commit 69ae525cb7
10 files changed
+81 -10

No files matched your search

@@ -196,6 +196,15 @@ export function registerIpcHandlers(deps: IpcDeps): void {
}
});
ipcMain.handle(IPC_CHANNELS.openFile, async (_event, input) => {
try {
await files.openFile(input);
return ok(null);
} catch (error) {
return fail("file_open_failed", error instanceof Error ? error.message : String(error));
}
});
ipcMain.handle(IPC_CHANNELS.pickDirectory, async () => {
try {
const result = await dialog.showOpenDialog(deps.mainWindow, { properties: ["openDirectory", "createDirectory"] });