feat: prepare Zhinian desktop pilot
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-05-07 21:49:20 +08:00
parent cddaf37016
commit 0abc48189c
103 changed files with 10975 additions and 2049 deletions

View File

@@ -117,7 +117,7 @@ describe('chat session actions', () => {
expect(h.read().loadHistory).toHaveBeenCalledTimes(1);
});
it('newSession creates a canonical session key and clears transient state', async () => {
it('newSession creates a desktop canonical session key and clears transient state', async () => {
const nowSpy = vi.spyOn(Date, 'now').mockReturnValue(1711111111111);
const { createSessionActions } = await import('@/stores/chat/session-actions');
const h = makeHarness({
@@ -132,8 +132,8 @@ describe('chat session actions', () => {
actions.newSession();
const next = h.read();
expect(next.currentSessionKey).toBe('agent:foo:session-1711111111111');
expect(next.sessions.some((s) => s.key === 'agent:foo:session-1711111111111')).toBe(true);
expect(next.currentSessionKey).toBe('agent:main:session-1711111111111');
expect(next.sessions.some((s) => s.key === 'agent:main:session-1711111111111')).toBe(true);
expect(next.messages).toEqual([]);
expect(next.streamingText).toBe('');
expect(next.activeRunId).toBeNull();
@@ -174,4 +174,3 @@ describe('chat session actions', () => {
expect(h.read().sessions.find((session) => session.key === 'agent:main:cron:job-1')?.updatedAt).toBe(1773281731621);
});
});