From a05915ddc8f34d592c05ac6a4f4e8d932a9a0964 Mon Sep 17 00:00:00 2001
From: Ashutosh Kumar <ashutoshpw@users.noreply.github.com>
Date: Mon, 22 Dec 2025 17:26:23 +0530
Subject: server: ensure frontend has correct port for PTY websocket
 connections (#5898)

---
 packages/desktop/src/app.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/desktop/src/app.tsx')

diff --git a/packages/desktop/src/app.tsx b/packages/desktop/src/app.tsx
index 2ed529bbc..e5607fd33 100644
--- a/packages/desktop/src/app.tsx
+++ b/packages/desktop/src/app.tsx
@@ -35,7 +35,7 @@ const url =
   new URLSearchParams(document.location.search).get("url") ||
   (location.hostname.includes("opencode.ai") || location.hostname.includes("localhost")
     ? `http://${host}:${port}`
-    : "/")
+    : window.location.origin)
 
 export function App() {
   return (
-- 
cgit v1.2.3

