Simplified setup flow: user installs node.js; pnpm is configured

This commit is contained in:
Will Chen
2025-04-17 23:05:44 -07:00
parent ffdf3e1c4b
commit f2b157b8bc
6 changed files with 190 additions and 289 deletions

View File

@@ -15,6 +15,7 @@ import type {
CreateAppResult,
InstallNodeResult,
ListAppsResponse,
NodeSystemInfo,
SandboxConfig,
Version,
} from "./ipc_types";
@@ -132,6 +133,10 @@ export class IpcClient {
return IpcClient.instance;
}
public async reloadDyad(): Promise<void> {
await this.ipcRenderer.invoke("reload-dyad");
}
// Create a new app with an initial chat
public async createApp(params: CreateAppParams): Promise<CreateAppResult> {
try {
@@ -493,10 +498,7 @@ export class IpcClient {
}
// Check Node.js and npm status
public async getNodejsStatus(): Promise<{
nodeVersion: string | null;
pnpmVersion: string | null;
}> {
public async getNodejsStatus(): Promise<NodeSystemInfo> {
try {
const result = await this.ipcRenderer.invoke("nodejs-status");
return result;
@@ -506,17 +508,6 @@ 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 });