|
@@ -3,14 +3,15 @@ import { defineConfig } from "electron-vite"
|
|
|
import appPlugin from "@opencode-ai/app/vite"
|
|
import appPlugin from "@opencode-ai/app/vite"
|
|
|
import * as fs from "node:fs/promises"
|
|
import * as fs from "node:fs/promises"
|
|
|
|
|
|
|
|
|
|
+const OPENCODE_SERVER_DIST = "../opencode/dist/node"
|
|
|
|
|
+
|
|
|
const channel = (() => {
|
|
const channel = (() => {
|
|
|
const raw = process.env.OPENCODE_CHANNEL
|
|
const raw = process.env.OPENCODE_CHANNEL
|
|
|
if (raw === "dev" || raw === "beta" || raw === "prod") return raw
|
|
if (raw === "dev" || raw === "beta" || raw === "prod") return raw
|
|
|
|
|
+ if (process.env.OPENCODE_CHANNEL === "latest") return "prod"
|
|
|
return "dev"
|
|
return "dev"
|
|
|
})()
|
|
})()
|
|
|
|
|
|
|
|
-const OPENCODE_SERVER_DIST = "../opencode/dist/node"
|
|
|
|
|
-
|
|
|
|
|
const nodePtyPkg = `@lydell/node-pty-${process.platform}-${process.arch}`
|
|
const nodePtyPkg = `@lydell/node-pty-${process.platform}-${process.arch}`
|
|
|
|
|
|
|
|
const sentry =
|
|
const sentry =
|
|
@@ -82,9 +83,6 @@ export default defineConfig({
|
|
|
plugins: [appPlugin, sentry],
|
|
plugins: [appPlugin, sentry],
|
|
|
publicDir: "../../../app/public",
|
|
publicDir: "../../../app/public",
|
|
|
root: "src/renderer",
|
|
root: "src/renderer",
|
|
|
- define: {
|
|
|
|
|
- "import.meta.env.VITE_OPENCODE_CHANNEL": JSON.stringify(channel),
|
|
|
|
|
- },
|
|
|
|
|
build: {
|
|
build: {
|
|
|
sourcemap: true,
|
|
sourcemap: true,
|
|
|
rollupOptions: {
|
|
rollupOptions: {
|