mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix(desktop): local dev url
This commit is contained in:
parent
06ca45189b
commit
3660e2c481
1 changed files with 3 additions and 1 deletions
|
|
@ -16,7 +16,9 @@ const port = import.meta.env.VITE_OPENCODE_SERVER_PORT ?? "4096"
|
|||
|
||||
const url =
|
||||
new URLSearchParams(document.location.search).get("url") ||
|
||||
(location.hostname.includes("opencode.ai") ? `http://${host}:${port}` : "/")
|
||||
(location.hostname.includes("opencode.ai") || location.hostname.includes("localhost")
|
||||
? `http://${host}:${port}`
|
||||
: "/")
|
||||
|
||||
const root = document.getElementById("root")
|
||||
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue