feat: prepare Zhinian desktop pilot
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user