diff --git a/src/common/ipc/channels.ts b/src/common/ipc/channels.ts index 5b488210..6013f6f8 100644 --- a/src/common/ipc/channels.ts +++ b/src/common/ipc/channels.ts @@ -159,6 +159,7 @@ export const UTIL_CHANNELS = { CHECK_INTERNET_CONNECTIVITY: "check-internet-connectivity", FETCH_FAVICON: "fetch-favicon", OPEN_IN_CONNECTION_BROWSER: "open-in-connection-browser", + RESTART_APP: "restart-app", } as const; // Filesystem-related IPC channels diff --git a/src/common/types/api.ts b/src/common/types/api.ts index 099255ec..0ca69ff8 100644 --- a/src/common/types/api.ts +++ b/src/common/types/api.ts @@ -40,6 +40,7 @@ export interface UtilsAPI { showModalWindow: (options: ModalWindowOptions) => Promise; closeModalWindow: () => Promise; sendModalMessage: (payload: ModalWindowMessagePayload) => Promise; + restartApp: () => Promise; } /** diff --git a/src/main/index.ts b/src/main/index.ts index 7bc0d04e..943c03ab 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -381,6 +381,7 @@ class ToolBoxApp { ipcMain.removeHandler(UTIL_CHANNELS.FETCH_FAVICON); ipcMain.removeHandler(UTIL_CHANNELS.OPEN_EXTERNAL); ipcMain.removeHandler(UTIL_CHANNELS.OPEN_IN_CONNECTION_BROWSER); + ipcMain.removeHandler(UTIL_CHANNELS.RESTART_APP); // Filesystem handlers ipcMain.removeHandler(FILESYSTEM_CHANNELS.READ_TEXT); @@ -1210,6 +1211,12 @@ class ToolBoxApp { this.modalWindowManager?.sendMessageToModal(payload); }); + ipcMain.handle(UTIL_CHANNELS.RESTART_APP, () => { + this.isQuitting = true; + app.relaunch(); + app.quit(); + }); + // Clipboard handler ipcMain.handle(UTIL_CHANNELS.COPY_TO_CLIPBOARD, (_, text) => { this.api.copyToClipboard(text); diff --git a/src/main/managers/toolRegistryManager.ts b/src/main/managers/toolRegistryManager.ts index 9b3c49fe..45a9ccb2 100644 --- a/src/main/managers/toolRegistryManager.ts +++ b/src/main/managers/toolRegistryManager.ts @@ -979,6 +979,9 @@ export class ToolRegistryManager extends EventEmitter { minAPI: manifestEntry.minAPI, maxAPI: manifestEntry.maxAPI, mcpHeadlessEnabled: manifestEntry.mcpHeadlessEnabled, + marketplaceSourceId: manifestEntry.marketplaceSourceId, + marketplaceSourceLabel: manifestEntry.marketplaceSourceLabel, + marketplaceSourceType: manifestEntry.marketplaceSourceType, }; } diff --git a/src/main/preload.ts b/src/main/preload.ts index 95589ebc..0408540a 100644 --- a/src/main/preload.ts +++ b/src/main/preload.ts @@ -185,6 +185,7 @@ contextBridge.exposeInMainWorld("toolboxAPI", { showModalWindow: (options: unknown) => ipcRenderer.invoke(UTIL_CHANNELS.SHOW_MODAL_WINDOW, options), closeModalWindow: () => ipcRenderer.invoke(UTIL_CHANNELS.CLOSE_MODAL_WINDOW), sendModalMessage: (payload: unknown) => ipcRenderer.invoke(UTIL_CHANNELS.SEND_MODAL_MESSAGE, payload), + restartApp: () => ipcRenderer.invoke(UTIL_CHANNELS.RESTART_APP), }, // Troubleshooting namespace - organized like other features diff --git a/src/renderer/index.html b/src/renderer/index.html index 69e0e9ef..49213676 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -112,6 +112,10 @@ Update Available + +