fix(desktop): better error messages on connection failure

This commit is contained in:
Adam
2025-12-22 19:16:50 -06:00
parent 3a54ab68d1
commit 680a63e3de
6 changed files with 97 additions and 12 deletions

View File

@@ -35,10 +35,10 @@ const url = iife(() => {
if (location.hostname.includes("opencode.ai")) return "http://localhost:4096"
if (window.__OPENCODE__) return `http://127.0.0.1:${window.__OPENCODE__.port}`
if (import.meta.env.VITE_OPENCODE_SERVER)
return `http://${import.meta.env.VITE_OPENCODE_SERVER_HOST}:${import.meta.env.VITE_OPENCODE_SERVER_PORT ?? "4096"}`
if (import.meta.env.DEV)
return `http://${import.meta.env.VITE_OPENCODE_SERVER_HOST ?? "localhost"}:${import.meta.env.VITE_OPENCODE_SERVER_PORT ?? "4096"}`
return "/"
return "http://localhost:4096"
})
export function App() {