fix(pi): keep active runs alive during background sleep

This commit is contained in:
brother7 committed 2026-08-25 21:08:10 +08:00
1 parent 92f4c91088
commit 621ebb1781
22 files changed
+1061 -68

No files matched your search

+2
View File
@@ -901,6 +901,7 @@ describe('auth host api routes', () => {
expect(response.statusCode).toBe(200);
expect(response.json()).toEqual({ success: true });
expect(stop).toHaveBeenCalledOnce();
expect(stop).toHaveBeenCalledWith('auth_cleanup');
expect(closeEventSessions).toHaveBeenCalledOnce();
expect(providerServiceMock.deleteAccountApiKey).toHaveBeenCalledWith('niancode-user-models');
});
@@ -927,6 +928,7 @@ describe('auth host api routes', () => {
success: false,
error: 'Failed to clear local AI runtime state',
});
expect(stop).toHaveBeenCalledWith('auth_cleanup');
expect(providerServiceMock.deleteAccountApiKey).toHaveBeenCalledWith('niancode-user-models');
});