diff --git a/packages/desktop/src/index.tsx b/packages/desktop/src/index.tsx index f9eb19a585..fe9e3f92e2 100644 --- a/packages/desktop/src/index.tsx +++ b/packages/desktop/src/index.tsx @@ -370,18 +370,51 @@ function ServerGate(props: { children: (data: Accessor) => JSX. }), ) + const errorMessage = () => { + const error = serverData.error + if (!error) return "Unknown error" + if (typeof error === "string") return error + if (error instanceof Error) return error.message + return String(error) + } + + const restartApp = async () => { + await invoke("kill_sidecar").catch(() => undefined) + await relaunch().catch(() => undefined) + } + return ( // Not using suspense as not all components are compatible with it (undefined refs) - -
-
+ + +
+
+ } + > + {(data) => props.children(data)} +
} > - {(data) => props.children(data)} +
+
OpenCode failed to start
+
+ The local OpenCode server could not be started. Restart the app, or check your network settings (VPN/proxy) + and try again. +
+
+
{errorMessage()}
+
+ +
+
) }