Explorar o código

fix(terminal): support remote server connections and fix GLIBC compatibility (#11906)

Lucas (TaeYoung) Jo hai 2 meses
pai
achega
891875402c
Modificáronse 3 ficheiros con 4 adicións e 3 borrados
  1. 2 2
      bun.lock
  2. 1 0
      packages/app/src/components/terminal.tsx
  3. 1 1
      packages/opencode/package.json

+ 2 - 2
bun.lock

@@ -309,7 +309,7 @@
         "ai": "catalog:",
         "ai-gateway-provider": "2.3.1",
         "bonjour-service": "1.3.0",
-        "bun-pty": "0.4.4",
+        "bun-pty": "0.4.8",
         "chokidar": "4.0.3",
         "clipboardy": "4.0.0",
         "decimal.js": "10.5.0",
@@ -2108,7 +2108,7 @@
 
     "bun-ffi-structs": ["[email protected]", "", { "peerDependencies": { "typescript": "^5" } }, "sha512-Lh1oQAYHDcnesJauieA4UNkWGXY9hYck7OA5IaRwE3Bp6K2F2pJSNYqq+hIy7P3uOvo3km3oxS8304g5gDMl/w=="],
 
-    "bun-pty": ["[email protected].4", "", {}, "sha512-WK4G6uWsZgu1v4hKIlw6G1q2AOf8Rbga2Yr7RnxArVjjyb+mtVa/CFc9GOJf+OYSJSH8k7LonAtQOVeNAddRyg=="],
+    "bun-pty": ["[email protected].8", "", {}, "sha512-rO70Mrbr13+jxHHHu2YBkk2pNqrJE5cJn29WE++PUr+GFA0hq/VgtQPZANJ8dJo6d7XImvBk37Innt8GM7O28w=="],
 
     "bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-inmAYe2PFLs0SUbFOWSVD24sg1jFlMPxOjOSSCYqUgn4Hsc3rDc7dFvfVYjFPNHtov6kgUeulV4SxbuIV/stPw=="],
 

+ 1 - 0
packages/app/src/components/terminal.tsx

@@ -146,6 +146,7 @@ export const Terminal = (props: TerminalProps) => {
       const once = { value: false }
 
       const url = new URL(sdk.url + `/pty/${local.pty.id}/connect?directory=${encodeURIComponent(sdk.directory)}`)
+      url.protocol = url.protocol === "https:" ? "wss:" : "ws:"
       if (window.__OPENCODE__?.serverPassword) {
         url.username = "opencode"
         url.password = window.__OPENCODE__?.serverPassword

+ 1 - 1
packages/opencode/package.json

@@ -94,7 +94,7 @@
     "ai": "catalog:",
     "ai-gateway-provider": "2.3.1",
     "bonjour-service": "1.3.0",
-    "bun-pty": "0.4.4",
+    "bun-pty": "0.4.8",
     "chokidar": "4.0.3",
     "clipboardy": "4.0.0",
     "decimal.js": "10.5.0",