Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

Import ContextMenuItem from contracts in desktop app

Julius Marminge9e2e73c07071
diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts
index 107371cc1..4fd4d0ba7 100644
--- a/apps/desktop/src/main.ts
+++ b/apps/desktop/src/main.ts
@@ -8,6 +8,7 @@ import path from "node:path";
import { app, BrowserWindow, dialog, ipcMain, Menu, nativeImage, protocol, shell } from "electron";
import type { MenuItemConstructorOptions } from "electron";
+import type { ContextMenuItem } from "@t3tools/contracts";
import { showDesktopConfirmDialog } from "./confirmDialog";
import { fixPath } from "./fixPath";
@@ -36,12 +37,6 @@ let restartTimer: ReturnType<typeof setTimeout> | null = null;
let isQuitting = false;
let desktopProtocolRegistered = false;
-interface DesktopContextMenuItem {
- id: string;
- label: string;
- destructive?: boolean;
-}
-
let destructiveMenuIconCache: Electron.NativeImage | null | undefined;
function getDestructiveMenuIcon(): Electron.NativeImage | undefined {
@@ -439,7 +434,7 @@ function registerIpcHandlers(): void {
CONTEXT_MENU_CHANNEL,
async (
_event,
- items: DesktopContextMenuItem[],
+ items: ContextMenuItem[],
position?: { x: number; y: number },
) => {
const normalizedItems = items