diff options
| author | Adam <[email protected]> | 2025-12-22 05:55:15 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-22 05:55:15 -0600 |
| commit | eebbd733468736cf28cdddf0b440821516b59bf2 (patch) | |
| tree | 18b7b9beb246347aaa79956298aa1b70796edf2d /packages | |
| parent | d4c981495a3005f7bff7b28056bd9f87dc317cfa (diff) | |
| download | opencode-eebbd733468736cf28cdddf0b440821516b59bf2.tar.gz opencode-eebbd733468736cf28cdddf0b440821516b59bf2.zip | |
Revert "fix: use current page port instead of hardcoded 4096 (#5949)"
This reverts commit d04a72a4ad6af0bfe75bbff36004d28adca179b2.
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/desktop/src/app.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/desktop/src/app.tsx b/packages/desktop/src/app.tsx index 4f4b6f32c..2ed529bbc 100644 --- a/packages/desktop/src/app.tsx +++ b/packages/desktop/src/app.tsx @@ -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 ( |
