(store: WorkspaceStore, workspaceId: string, todos: TodoItem[])
| 715 | } |
| 716 | |
| 717 | function seedPinnedTodos(store: WorkspaceStore, workspaceId: string, todos: TodoItem[]): void { |
| 718 | const aggregator = store.getAggregator(workspaceId); |
| 719 | if (!aggregator) { |
| 720 | throw new Error(`Missing aggregator for ${workspaceId}`); |
| 721 | } |
| 722 | |
| 723 | aggregator.handleStreamStart({ |
| 724 | type: "stream-start", |
| 725 | workspaceId, |
| 726 | messageId: `${workspaceId}-stream`, |
| 727 | historySequence: 1, |
| 728 | model: "claude-sonnet-4", |
| 729 | startTime: 1_000, |
| 730 | }); |
| 731 | aggregator.handleToolCallStart({ |
| 732 | type: "tool-call-start", |
| 733 | workspaceId, |
| 734 | messageId: `${workspaceId}-stream`, |
| 735 | toolCallId: `${workspaceId}-todo-write`, |
| 736 | toolName: "todo_write", |
| 737 | args: { todos }, |
| 738 | tokens: 10, |
| 739 | timestamp: 1_001, |
| 740 | }); |
| 741 | aggregator.handleToolCallEnd({ |
| 742 | type: "tool-call-end", |
| 743 | workspaceId, |
| 744 | messageId: `${workspaceId}-stream`, |
| 745 | toolCallId: `${workspaceId}-todo-write`, |
| 746 | toolName: "todo_write", |
| 747 | result: { success: true }, |
| 748 | timestamp: 1_002, |
| 749 | }); |
| 750 | } |
| 751 | |
| 752 | describe("WorkspaceStore", () => { |
| 753 | let store: WorkspaceStore; |
no test coverage detected