From 58ab95e32cfe172dd707d5aa84250028ff7f5432 Mon Sep 17 00:00:00 2001 From: LukeParkerDev <10430890+Hona@users.noreply.github.com> Date: Thu, 16 Apr 2026 14:49:35 +1000 Subject: [PATCH] feat: add restart-to-apply local runtime changes --- .../src/components/dialog-local-server.tsx | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/app/src/components/dialog-local-server.tsx b/packages/app/src/components/dialog-local-server.tsx index 8f41c90c94..305ada58fc 100644 --- a/packages/app/src/components/dialog-local-server.tsx +++ b/packages/app/src/components/dialog-local-server.tsx @@ -44,6 +44,19 @@ export function DialogLocalServer() { const busy = createMemo(() => !!current()?.job) const mode = createMemo(() => current()?.config.mode ?? "windows") const selected = createMemo(() => current()?.checks.distro?.selected) + const configuredRuntime = createMemo(() => { + const state = current() + if (!state) return { mode: "windows" as const, distro: null as string | null } + if (state.config.mode === "wsl" && state.config.distro) { + return { mode: "wsl" as const, distro: state.config.distro } + } + return { mode: "windows" as const, distro: null as string | null } + }) + const needsRestart = createMemo(() => { + const state = current() + if (!state) return false + return state.runtime.mode !== configuredRuntime().mode || state.runtime.distro !== configuredRuntime().distro + }) const run = async (action: () => Promise) => { try { @@ -117,6 +130,14 @@ export function DialogLocalServer() { ? `wsl${current()?.runtime.distro ? `:${current()?.runtime.distro}` : ""}` : "windows"} + +
+
Restart OpenCode to apply local runtime changes.
+ +
+