Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ metadata and the backend fallback mirror it.

### Fixed

- Agent CLI discovery prefers the newest installed NVM Node release when launched from the desktop — thanks @rudycelekli! (#2644)

- MCP speech tools wait through model loading and progress-extended CPU renders instead of timing out before the backend (#2609)

## [0.5.7] — 2026-10-05
Expand Down
4 changes: 4 additions & 0 deletions docs/electron-repair.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,7 @@ Automatic renderer-crash repair uses the source workspace. Without an attached
checkout, it opens the source-folder controls and preserves the request; choose
a checkout and press Send to continue. Explicit app action requests continue to
use the app workspace without a checkout.

For a GUI launch on macOS or Linux, CLI discovery searches inherited PATH entries
first, then standard user install locations. NVM release folders are searched
from the newest numeric Node version to the oldest.
19 changes: 19 additions & 0 deletions electron/src/main/tool-path.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,22 @@ describe('toolSearchDirs', () => {
expect(env.Path).toContain('npm');
});
});

it('searches NVM releases by numeric version, keeping an inherited Node first', async () => {
const { mkdtempSync, mkdirSync, rmSync } = await import('node:fs');
const { tmpdir } = await import('node:os');
const home = mkdtempSync(join(tmpdir(), 'voice-tool-path-'));
try {
for (const version of ['v9.11.2', 'v22.9.0', 'v22.10.0', 'v24.1.0'])
mkdirSync(join(home, '.nvm', 'versions', 'node', version, 'bin'), { recursive: true });
const dirs = toolSearchDirs({ env: { PATH: '/chosen/node/bin' }, platform: 'darwin', home });
expect(dirs[0]).toBe('/chosen/node/bin');
expect(dirs.filter((path) => path.includes('/.nvm/'))).toEqual(
['v24.1.0', 'v22.10.0', 'v22.9.0', 'v9.11.2'].map((version) =>
join(home, '.nvm', 'versions', 'node', version, 'bin'),
),
);
} finally {
rmSync(home, { recursive: true, force: true });
}
});
4 changes: 2 additions & 2 deletions electron/src/main/tool-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ function nvmBinDirs(home: string): string[] {
const root = join(home, '.nvm', 'versions', 'node');
try {
return readdirSync(root)
.sort()
.reverse()
.filter((version) => /^v\d+\.\d+\.\d+$/.test(version))
.sort((left, right) => right.localeCompare(left, 'en', { numeric: true }))
.map((version) => join(root, version, 'bin'));
} catch {
return [];
Expand Down
Loading