Skip to content

Commit eebbd73

Browse files
committed
Revert "fix: use current page port instead of hardcoded 4096 (#5949)"
This reverts commit d04a72a.
1 parent d4c9814 commit eebbd73

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/desktop/src/app.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,13 @@ declare global {
2929
}
3030

3131
const host = import.meta.env.VITE_OPENCODE_SERVER_HOST ?? "127.0.0.1"
32-
const port = window.__OPENCODE__?.port ?? import.meta.env.VITE_OPENCODE_SERVER_PORT ?? location.port ?? "4096"
32+
const port = window.__OPENCODE__?.port ?? import.meta.env.VITE_OPENCODE_SERVER_PORT ?? "4096"
3333

3434
const url =
3535
new URLSearchParams(document.location.search).get("url") ||
36-
(location.hostname.includes("opencode.ai")
36+
(location.hostname.includes("opencode.ai") || location.hostname.includes("localhost")
3737
? `http://${host}:${port}`
38-
: location.hostname.includes("localhost") || location.hostname === "127.0.0.1"
39-
? `${location.protocol}//${location.host}`
40-
: "/")
38+
: "/")
4139

4240
export function App() {
4341
return (

0 commit comments

Comments
 (0)