The best way to control Claude Code, Codex and more from any computer or phone
Import ContextMenuItem from contracts in desktop app
Remove the duplicate DesktopContextMenuItem interface and use the shared ContextMenuItem type from @t3tools/contracts instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Julius Marminge committed
Mar 2, 2026 at 13:34 UTC
9e2e73c070710bfcb132cfff3ca1eb7b03996dd7
1 file changed
+2
-7
apps/desktop/src/main.ts
+2
-7
@@ -8,6 +8,7 @@ import path from "node:path";
8
import { app, BrowserWindow, dialog, ipcMain, Menu, nativeImage, protocol, shell } from "electron";
9
import type { MenuItemConstructorOptions } from "electron";
10
11
+import type { ContextMenuItem } from "@t3tools/contracts";
12
import { showDesktopConfirmDialog } from "./confirmDialog";
13
import { fixPath } from "./fixPath";
14
@@ -36,12 +37,6 @@ let restartTimer: ReturnType<typeof setTimeout> | null = null;
37
let isQuitting = false;
38
let desktopProtocolRegistered = false;
39
39
-interface DesktopContextMenuItem {
40
- id: string;
41
- label: string;
42
- destructive?: boolean;
43
-}
44
-
40
let destructiveMenuIconCache: Electron.NativeImage | null | undefined;
41
42
function getDestructiveMenuIcon(): Electron.NativeImage | undefined {
@@ -439,7 +434,7 @@ function registerIpcHandlers(): void {
434
CONTEXT_MENU_CHANNEL,
435
async (
436
_event,
442
- items: DesktopContextMenuItem[],
437
+ items: ContextMenuItem[],
438
position?: { x: number; y: number },
439
) => {
440
const normalizedItems = items