feat: 改造聊天记录分析为agent模式

This commit is contained in:
digua
2025-12-03 20:33:38 +08:00
parent 9f08005086
commit 63ed7765aa
20 changed files with 1930 additions and 379 deletions
@@ -156,10 +156,11 @@ async function preprocessQQJson(inputPath: string, onProgress?: (progress: Parse
let chatInfo: Record<string, unknown> = { name: '未知群聊', type: 'group' }
let metadata: Record<string, unknown> | undefined
headStream.on('data', (chunk: string) => {
headStream.on('data', (chunk: string | Buffer) => {
const str = typeof chunk === 'string' ? chunk : chunk.toString('utf-8')
if (headSize < maxHeadSize) {
headChunks.push(chunk)
headSize += chunk.length
headChunks.push(str)
headSize += str.length
} else {
headStream.destroy()
}