summaryrefslogtreecommitdiffhomepage
path: root/packages/desktop/src
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-11-04 12:33:03 -0500
committerDax Raad <[email protected]>2025-11-04 12:33:14 -0500
commitbc6f4aed2bfb662d24a28b1cfe927a3e8af637bf (patch)
tree309887906033508c991544edd56e11019c949cc5 /packages/desktop/src
parent2af3f19397b83badd59fcbbb5fff1657d344bf10 (diff)
downloadopencode-bc6f4aed2bfb662d24a28b1cfe927a3e8af637bf.tar.gz
opencode-bc6f4aed2bfb662d24a28b1cfe927a3e8af637bf.zip
local web
Diffstat (limited to 'packages/desktop/src')
-rw-r--r--packages/desktop/src/index.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/desktop/src/index.tsx b/packages/desktop/src/index.tsx
index 0d631a5a0..9fe5da2f6 100644
--- a/packages/desktop/src/index.tsx
+++ b/packages/desktop/src/index.tsx
@@ -12,7 +12,9 @@ import Home from "@/pages"
const host = import.meta.env.VITE_OPENCODE_SERVER_HOST ?? "127.0.0.1"
const port = import.meta.env.VITE_OPENCODE_SERVER_PORT ?? "4096"
-const url = new URLSearchParams(document.location.search).get("url") || `http://${host}:${port}`
+const url =
+ new URLSearchParams(document.location.search).get("url") ||
+ (location.hostname.includes("opencode.ai") ? `http://${host}:${port}` : "/")
const root = document.getElementById("root")
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {