feat: add silent install/update lifecycle for managed CLI tools

Expand tool version detection to all six managed apps (including Hermes
via PyPI), and add a run_tool_lifecycle_action command that installs or
updates CLI tools silently: it captures the subprocess output and blocks
until the command actually finishes instead of popping a terminal window
(Windows uses CREATE_NO_WINDOW). On failure the last lines of stderr are
returned so the UI can surface a useful message.

Also restores the Windows version-detection path by gating try_get_version
behind cfg(not(windows)) so it no longer risks triggering the App
Execution Alias / protocol handler that previously disabled Windows.
This commit is contained in:
Jason
2026-05-22 09:40:05 +08:00
parent c12d20efd0
commit ee2d634d89
3 changed files with 379 additions and 50 deletions
+15
View File
@@ -192,6 +192,21 @@ export const settingsApi = {
return await invoke("get_tool_versions", { tools, wslShellByTool });
},
async runToolLifecycleAction(
tools: string[],
action: "install" | "update",
wslShellByTool?: Record<
string,
{ wslShell?: string | null; wslShellFlag?: string | null }
>,
): Promise<void> {
await invoke("run_tool_lifecycle_action", {
tools,
action,
wslShellByTool,
});
},
async getRectifierConfig(): Promise<RectifierConfig> {
return await invoke("get_rectifier_config");
},