|
|
@@ -8,6 +8,7 @@ import type { DesktopMenuAction } from "@opencode-ai/app/desktop-menu"
|
|
|
import type { FatalRendererError, ServerReadyData, TitlebarTheme } from "../preload/types"
|
|
|
import { runDesktopMenuAction } from "./desktop-menu-actions"
|
|
|
import { setForceFocus } from "./debug"
|
|
|
+import { safeExternalUrl } from "./external-link"
|
|
|
import { assertAttachmentBudget, createPickedFileAuthorizations } from "./attachment-picker"
|
|
|
import { getStore, removeStoreFileIfEmpty } from "./store"
|
|
|
import { getPinchZoomEnabled, getWindowID, setPinchZoomEnabled, setTitlebar, updateTitlebar } from "./windows"
|
|
|
@@ -178,7 +179,9 @@ export function registerIpcHandlers(deps: Deps) {
|
|
|
)
|
|
|
|
|
|
ipcMain.on("open-link", (_event: IpcMainEvent, url: string) => {
|
|
|
- void shell.openExternal(url)
|
|
|
+ const externalUrl = safeExternalUrl(url)
|
|
|
+ if (!externalUrl) return
|
|
|
+ void shell.openExternal(externalUrl)
|
|
|
})
|
|
|
|
|
|
ipcMain.handle("open-path", async (_event: IpcMainInvokeEvent, path: string, app?: string) => {
|