(
aiChatId: string,
content: string,
meta: { bufferBoundaryTimestamp: number; compressedMessageCount: number }
)
| 936 | // ==================== Summary / 压缩专用 ==================== |
| 937 | |
| 938 | addSummaryMessage( |
| 939 | aiChatId: string, |
| 940 | content: string, |
| 941 | meta: { bufferBoundaryTimestamp: number; compressedMessageCount: number } |
| 942 | ): AIMessage { |
| 943 | const contentBlocks: ContentBlock[] = [ |
| 944 | { |
| 945 | type: 'summary_meta', |
| 946 | bufferBoundaryTimestamp: meta.bufferBoundaryTimestamp, |
| 947 | compressedMessageCount: meta.compressedMessageCount, |
| 948 | }, |
| 949 | ] |
| 950 | |
| 951 | return this.addMessage(aiChatId, 'summary', content, undefined, undefined, contentBlocks) |
| 952 | } |
| 953 | |
| 954 | getLatestSummary(aiChatId: string): AIMessage | null { |
| 955 | const row = [...this.getActivePathRows(aiChatId)].reverse().find((message) => message.role === 'summary') |
no test coverage detected