MCPcopy Create free account
hub / github.com/anomalyco/opencode / getCurrentUrl

Function getCurrentUrl

packages/app/src/entry.tsx:102–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100}
101
102const getCurrentUrl = () => {
103 if (location.hostname.includes("opencode.ai")) return "http://localhost:4096"
104 if (import.meta.env.DEV)
105 return `http://${import.meta.env.VITE_OPENCODE_SERVER_HOST ?? "localhost"}:${import.meta.env.VITE_OPENCODE_SERVER_PORT ?? "4096"}`
106 return location.origin
107}
108
109const getDefaultUrl = () => {
110 const lsDefault = readDefaultServerUrl()

Callers 2

getDefaultUrlFunction · 0.85
entry.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected