local web
This commit is contained in:
parent
2af3f19397
commit
bc6f4aed2b
5 changed files with 21 additions and 6 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue