refactor: Centralise deeplink encode and decode into server (#3489)

This commit is contained in:
Jarrod Sibbison
2025-07-20 18:13:55 +10:00
committed by GitHub
parent ef496329b9
commit e2e656c012
20 changed files with 667 additions and 263 deletions
+3 -14
View File
@@ -1,9 +1,6 @@
import Electron, { contextBridge, ipcRenderer, webUtils } from 'electron';
import { Recipe } from './recipe';
// RecipeConfig is used for window creation and should match Recipe interface
type RecipeConfig = Recipe;
interface NotificationData {
title: string;
body: string;
@@ -55,7 +52,7 @@ type ElectronAPI = {
dir?: string,
version?: string,
resumeSessionId?: string,
recipeConfig?: RecipeConfig,
recipe?: Recipe,
viewType?: string
) => void;
logInfo: (txt: string) => void;
@@ -139,18 +136,10 @@ const electronAPI: ElectronAPI = {
dir?: string,
version?: string,
resumeSessionId?: string,
recipeConfig?: RecipeConfig,
recipe?: Recipe,
viewType?: string
) =>
ipcRenderer.send(
'create-chat-window',
query,
dir,
version,
resumeSessionId,
recipeConfig,
viewType
),
ipcRenderer.send('create-chat-window', query, dir, version, resumeSessionId, recipe, viewType),
logInfo: (txt: string) => ipcRenderer.send('logInfo', txt),
showNotification: (data: NotificationData) => ipcRenderer.send('notify', data),
showMessageBox: (options: MessageBoxOptions) => ipcRenderer.invoke('show-message-box', options),