refactor: extract dashboard and message-runtime from index.ts
- Extract dashboard code into src/dashboard.ts - Extract message runtime into src/message-runtime.ts - Improve group-queue with better concurrency handling - Update agent-runner with enhanced env/config passing - Simplify DB operations and cleanup unused code - Update README for Codex SDK architecture
This commit is contained in:
@@ -3,12 +3,15 @@ import { describe, it, expect, beforeEach } from 'vitest';
|
||||
import {
|
||||
_initTestDatabase,
|
||||
createTask,
|
||||
deleteSession,
|
||||
deleteTask,
|
||||
getAllChats,
|
||||
getAllRegisteredGroups,
|
||||
getMessagesSince,
|
||||
getNewMessages,
|
||||
getSession,
|
||||
getTaskById,
|
||||
setSession,
|
||||
setRegisteredGroup,
|
||||
storeChatMetadata,
|
||||
storeMessage,
|
||||
@@ -300,6 +303,16 @@ describe('getNewMessages', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('session accessors', () => {
|
||||
it('deletes only the current service session for a group', () => {
|
||||
setSession('group-a', 'session-123');
|
||||
expect(getSession('group-a')).toBe('session-123');
|
||||
|
||||
deleteSession('group-a');
|
||||
expect(getSession('group-a')).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
// --- storeChatMetadata ---
|
||||
|
||||
describe('storeChatMetadata', () => {
|
||||
|
||||
Reference in New Issue
Block a user