wip(plugins): save selected-terminal sharing authority and contract

This commit is contained in:
陈奇 committed 2026-10-26 13:04:31 +00:00
1 parent f868221b5f
commit 3cdc97782e
17 files changed
+404 -20

No files matched your search

+5
View File
@@ -20,6 +20,7 @@ const CHANNELS = Object.freeze({
themeApply: "netcatty:plugins:theme-apply",
themesChanged: "netcatty:plugins:themes-changed",
status: "netcatty:plugins:status",
terminalTarget: "netcatty:plugins:terminal-target",
interactionReady: "netcatty:plugins:interaction-ready",
interactionResponse: "netcatty:plugins:interaction-response",
list: "netcatty:plugins:list",
@@ -726,6 +727,10 @@ function registerPluginBridge(ipcMain, options) {
));
handle(CHANNELS.restart, async (activeManager, payload) => activeManager.restart(payload?.pluginId));
handle(CHANNELS.uninstall, async (activeManager, payload) => activeManager.uninstall(payload?.pluginId));
handle(CHANNELS.terminalTarget, async (_manager, target, event) => {
if (!options.interactionService) throw new Error("Host interactions unavailable");
return options.interactionService.setTerminalTarget(event.sender, target);
});
handle(CHANNELS.themeCatalog, async () => {
if (!options.themeService) throw new Error("Plugin themes are unavailable");
return options.themeService.catalog();