feat: 完善日报语音转写与全部聊天分目录导出

This commit is contained in:
电摇小子
2026-08-11 02:59:54 +08:00
parent d1a090bb6b
commit 7a5499f093
28 changed files with 1909 additions and 193 deletions
+17
View File
@@ -1,6 +1,8 @@
import { describe, expect, it } from 'vitest'
import { parseGroupDailyReport } from '../../src/renderer/src/utils/group-report'
import { summaryContent } from '../../src/renderer/src/utils/group-report-facts'
import type { GroupReportMetadata } from '../../src/shared/group-report'
import type { Message } from '../../src/shared/types'
const metadata: GroupReportMetadata = {
groupName: '测试群',
@@ -23,6 +25,21 @@ const media = {
}
describe('group report parsing', () => {
it('includes a cached voice transcript in the report input content', () => {
const message: Message = {
id: 'voice-1',
from: 'member',
type: '语音',
datetime: '2026-08-06 10:00:00',
content: '[语音]',
isSender: false,
contentData: { type: 'voice', duration: 3 },
voiceTranscript: '今晚八点确认发布。'
}
expect(summaryContent(message)).toContain('今晚八点确认发布。')
})
it('falls back to topic keywords when the model omits top-level keywords', () => {
const report = parseGroupDailyReport(
JSON.stringify({