fix(desktop): better error messages on connection failure
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user