mirror of
https://github.com/davidkaya/aryx.git
synced 2026-12-03 05:44:05 +01:00
fix: restart idle sidecar on capability refresh
Force-refreshing sidecar capabilities now disposes the idle sidecar process before re-querying capabilities, so Kopaya can pick up backend sidecar changes and refreshed Copilot connection state without a full app restart. Add a small helper and regression tests for the refresh decision. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
a77bd107ab
commit
9cded003b5
4 files changed
+41
-1
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import { describe, expect, test } from 'bun:test';
|
||||
|
||||
import { shouldRestartSidecarOnCapabilityRefresh } from '@main/sidecar/sidecarRefresh';
|
||||
|
||||
describe('shouldRestartSidecarOnCapabilityRefresh', () => {
|
||||
test('restarts the sidecar when no run-turn is active', () => {
|
||||
expect(shouldRestartSidecarOnCapabilityRefresh(false)).toBe(true);
|
||||
});
|
||||
|
||||
test('keeps the existing sidecar when a run-turn is active', () => {
|
||||
expect(shouldRestartSidecarOnCapabilityRefresh(true)).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user