Skip to content

Commit 77f2305

Browse files
committed
use electron-is-dev
1 parent 7ac0b0d commit 77f2305

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/services/agent.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
type IpcMainInvokeEvent,
88
ipcMain,
99
} from "electron";
10+
import isDev from "electron-is-dev";
1011

1112
interface AgentStartParams {
1213
taskId: string;
@@ -31,6 +32,14 @@ export interface TaskController {
3132
currentRunId?: string;
3233
}
3334

35+
function getClaudeCliPath(): string {
36+
const appPath = app.getAppPath();
37+
38+
return app.isPackaged
39+
? join(`${appPath}.unpacked`, ".vite/build/cli.js")
40+
: join(appPath, ".vite/build/cli.js")
41+
}
42+
3443
function getClaudeCliPath(): string {
3544
const appPath = app.getAppPath();
3645
const isProduction = !appPath.includes("node_modules");

0 commit comments

Comments
 (0)