Basic GitHub integration flow

This commit is contained in:
Will Chen
2025-04-14 18:12:43 -07:00
parent 3ceb3e23c6
commit 7ad83a2bdc
9 changed files with 633 additions and 26 deletions

View File

@@ -32,6 +32,7 @@ const validInvokeChannels = [
"open-external-url",
"reset-all",
"nodejs-status",
"github:start-flow",
] as const;
// Add valid receive channels
@@ -40,6 +41,9 @@ const validReceiveChannels = [
"chat:response:end",
"chat:response:error",
"app:output",
"github:flow-update",
"github:flow-success",
"github:flow-error",
] as const;
type ValidInvokeChannel = (typeof validInvokeChannels)[number];
@@ -76,5 +80,13 @@ contextBridge.exposeInMainWorld("electron", {
ipcRenderer.removeAllListeners(channel);
}
},
removeListener: (
channel: ValidReceiveChannel,
listener: (...args: unknown[]) => void
) => {
if (validReceiveChannels.includes(channel)) {
ipcRenderer.removeListener(channel, listener);
}
},
},
});