mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
Revert "fix: use current page port instead of hardcoded 4096 (#5949)"
This reverts commit d04a72a4ad6af0bfe75bbff36004d28adca179b2.
This commit is contained in:
parent
d4c981495a
commit
eebbd73346
@ -29,15 +29,13 @@ declare global {
|
||||
}
|
||||
|
||||
const host = import.meta.env.VITE_OPENCODE_SERVER_HOST ?? "127.0.0.1"
|
||||
const port = window.__OPENCODE__?.port ?? import.meta.env.VITE_OPENCODE_SERVER_PORT ?? location.port ?? "4096"
|
||||
const port = window.__OPENCODE__?.port ?? import.meta.env.VITE_OPENCODE_SERVER_PORT ?? "4096"
|
||||
|
||||
const url =
|
||||
new URLSearchParams(document.location.search).get("url") ||
|
||||
(location.hostname.includes("opencode.ai")
|
||||
(location.hostname.includes("opencode.ai") || location.hostname.includes("localhost")
|
||||
? `http://${host}:${port}`
|
||||
: location.hostname.includes("localhost") || location.hostname === "127.0.0.1"
|
||||
? `${location.protocol}//${location.host}`
|
||||
: "/")
|
||||
: "/")
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user