Remove runtime mode selection & have unified setup flow for node.js + API access

This commit is contained in:
Will Chen
2025-04-17 16:52:20 -07:00
parent ba3c9f7a28
commit 24c1be224b
12 changed files with 377 additions and 674 deletions

View File

@@ -13,6 +13,7 @@ import type {
ChatStreamParams,
CreateAppParams,
CreateAppResult,
InstallNodeResult,
ListAppsResponse,
SandboxConfig,
Version,
@@ -520,6 +521,17 @@ export class IpcClient {
}
}
// Install Node.js and npm
public async installNode(): Promise<InstallNodeResult> {
try {
const result = await this.ipcRenderer.invoke("install-node");
return result;
} catch (error) {
showError(error);
throw error;
}
}
// --- GitHub Device Flow ---
public startGithubDeviceFlow(appId: number | null): void {
this.ipcRenderer.invoke("github:start-flow", { appId });