(aiChatId: string)
| 402 | } |
| 403 | |
| 404 | private getAllMessageRows(aiChatId: string): AIMessageRow[] { |
| 405 | return this.getDb() |
| 406 | .prepare( |
| 407 | `SELECT id, ai_chat_id as aiChatId, role, content, timestamp, |
| 408 | parent_id as parentId, sibling_group_id as siblingGroupId, branch_index as branchIndex, |
| 409 | data_keywords as dataKeywords, data_message_count as dataMessageCount, |
| 410 | content_blocks as contentBlocks, token_usage as tokenUsage |
| 411 | FROM ai_message WHERE ai_chat_id = ? ORDER BY timestamp ASC, id ASC` |
| 412 | ) |
| 413 | .all(aiChatId) as AIMessageRow[] |
| 414 | } |
| 415 | |
| 416 | private getActivePathRows(aiChatId: string, leafMessageId?: string | null): AIMessageRow[] { |
| 417 | if (leafMessageId === null) return [] |
no test coverage detected