fix: improve Windows managed OpenCode shutdown and launch behavior (#844)

* fix: windows shutdown and restart orphaned cleanup

* fix: launch managed OpenCode directly on Windows
Unwrap OpenCode wrappers to launch directly on Windows, improving shutdown reliability and avoid orphans.

* fix: restore desktopNotifyEnabled in health snapshot

---------

Signed-off-by: Dr. Zed <142888684+DocterZed@users.noreply.github.com>
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
Dr. Zed
2026-04-11 22:29:09 +03:00
committed by GitHub
co-authored by Bohdan Triapitsyn
parent a3d73a8b67
commit 636dcd5314
8 changed files with 512 additions and 100 deletions
@@ -4,7 +4,7 @@ export const createOpenCodeResolutionRuntime = (dependencies) => {
resolveOpencodeCliPath,
applyOpencodeBinaryFromSettings,
ensureOpencodeCliEnv,
opencodeShimInterpreter,
resolveManagedOpenCodeLaunchSpec,
getResolvedState,
setResolvedOpencodeBinarySource,
} = dependencies;
@@ -42,7 +42,9 @@ export const createOpenCodeResolutionRuntime = (dependencies) => {
source !== 'env'
? source
: rawDetectedSourceNow;
const shim = resolved ? opencodeShimInterpreter(resolved) : null;
const launchSpec = resolved && !useWslForOpencode
? resolveManagedOpenCodeLaunchSpec(resolved)
: null;
return {
configured,
@@ -51,7 +53,9 @@ export const createOpenCodeResolutionRuntime = (dependencies) => {
source,
detectedNow,
detectedSourceNow,
shim,
launchBinary: launchSpec?.binary || null,
launchArgs: launchSpec?.args || [],
launchWrapperType: launchSpec?.wrapperType || null,
viaWsl: useWslForOpencode,
wslBinary: resolvedWslBinary || null,
wslPath: resolvedWslOpencodePath || null,