mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-26 16:19:40 +00:00
refactor: give desktop local server a windows key
This commit is contained in:
parent
8af7b5cd65
commit
d6f2b9f1b7
3 changed files with 4 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ export function serverName(conn?: ServerConnection.Any, ignoreDisplayName = fals
|
|||
|
||||
function projectsKey(key: ServerConnection.Key) {
|
||||
if (!key) return ""
|
||||
if (key === "sidecar") return "local"
|
||||
if (key === "sidecar" || key === "local:windows") return "local"
|
||||
if (isLocalHost(key)) return "local"
|
||||
return key
|
||||
}
|
||||
|
|
@ -81,7 +81,7 @@ export namespace ServerConnection {
|
|||
return Key.make(conn.http.url)
|
||||
case "sidecar": {
|
||||
if (conn.variant === "wsl") return Key.make(`wsl:${conn.distro}`)
|
||||
return Key.make("sidecar")
|
||||
return Key.make("local:windows")
|
||||
}
|
||||
case "ssh":
|
||||
return Key.make(`ssh:${conn.host}`)
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ render(() => {
|
|||
{(_) => {
|
||||
return (
|
||||
<AppInterface
|
||||
defaultServer={defaultServer.latest ?? ServerConnection.Key.make("sidecar")}
|
||||
defaultServer={defaultServer.latest ?? ServerConnection.Key.make("local:windows")}
|
||||
servers={servers()}
|
||||
router={MemoryRouter}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ render(() => {
|
|||
{(_) => {
|
||||
return (
|
||||
<AppInterface
|
||||
defaultServer={defaultServer.latest ?? ServerConnection.Key.make("sidecar")}
|
||||
defaultServer={defaultServer.latest ?? ServerConnection.Key.make("local:windows")}
|
||||
servers={servers()}
|
||||
>
|
||||
<Inner />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue