Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions apps/desktop/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import { isArm64HostRunningIntelBuild, resolveDesktopRuntimeInfo } from "./runti
syncShellEnvironment();

const PICK_FOLDER_CHANNEL = "desktop:pick-folder";
const CAPTURE_WINDOW_CHANNEL = "desktop:capture-window";
const CONFIRM_CHANNEL = "desktop:confirm";
const SET_THEME_CHANNEL = "desktop:set-theme";
const SET_SIDEBAR_OPACITY_CHANNEL = "desktop:set-sidebar-opacity";
Expand Down Expand Up @@ -1178,19 +1177,6 @@ function registerIpcHandlers(): void {
return result.filePaths[0] ?? null;
});

ipcMain.removeHandler(CAPTURE_WINDOW_CHANNEL);
ipcMain.handle(CAPTURE_WINDOW_CHANNEL, async (event) => {
try {
const image = await event.sender.capturePage();
if (image.isEmpty()) {
return null;
}
return image.toDataURL();
} catch {
return null;
}
});

ipcMain.removeHandler(CONFIRM_CHANNEL);
ipcMain.handle(CONFIRM_CHANNEL, async (_event, message: unknown) => {
if (typeof message !== "string") {
Expand Down
2 changes: 0 additions & 2 deletions apps/desktop/src/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { contextBridge, ipcRenderer } from "electron";
import type { DesktopBridge } from "@okcode/contracts";

const PICK_FOLDER_CHANNEL = "desktop:pick-folder";
const CAPTURE_WINDOW_CHANNEL = "desktop:capture-window";
const CONFIRM_CHANNEL = "desktop:confirm";
const SET_THEME_CHANNEL = "desktop:set-theme";
const SET_SIDEBAR_OPACITY_CHANNEL = "desktop:set-sidebar-opacity";
Expand Down Expand Up @@ -36,7 +35,6 @@ const wsUrl = process.env.OKCODE_DESKTOP_WS_URL ?? null;

contextBridge.exposeInMainWorld("desktopBridge", {
getWsUrl: () => wsUrl,
captureWindow: () => ipcRenderer.invoke(CAPTURE_WINDOW_CHANNEL),
pickFolder: () => ipcRenderer.invoke(PICK_FOLDER_CHANNEL),
confirm: (message) => ipcRenderer.invoke(CONFIRM_CHANNEL, message),
setTheme: (theme) => ipcRenderer.invoke(SET_THEME_CHANNEL, theme),
Expand Down
1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"@xterm/xterm": "^6.0.0",
"class-variance-authority": "^0.7.1",
"effect": "catalog:",
"html-to-image": "^1.11.13",
"lexical": "^0.41.0",
"lucide-react": "^0.564.0",
"oxfmt": "^0.44.0",
Expand Down
Loading
Loading