perf: optimize app startup and background lifecycles

This commit is contained in:
inman
2026-08-19 00:56:15 +08:00
parent 31332f6d76
commit 927e13349b
121 changed files with 4359 additions and 1400 deletions

View File

@@ -127,7 +127,7 @@ describe('managed Python runtime resolution', () => {
const runtime = { executable: 'C:\\NianCode\\python\\python.exe', binDir: 'C:\\NianCode\\python', source: 'bundled' as const };
const result = prependPythonToPath({ Path: 'existing-bin' }, runtime, 'win32');
expect(result.Path).toBe(`${runtime.binDir}${delimiter}existing-bin`);
expect(result.Path).toBe(`${runtime.binDir};existing-bin`);
expect(result).not.toHaveProperty('PATH');
});
@@ -154,7 +154,7 @@ describe('managed Python runtime resolution', () => {
uvRuntime,
'win32',
)).toEqual({
Path: `${dirname(uvExecutable)}${delimiter}${dirname(pythonExecutable)}${delimiter}C:\\Windows\\System32`,
Path: `${dirname(uvExecutable)};${dirname(pythonExecutable)};C:\\Windows\\System32`,
NIANCODE_PYTHON_PATH: pythonExecutable,
NIANCODE_UV_PATH: uvExecutable,
});