mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-17 03:27:00 +08:00
feat: 完善日报语音转写与全部聊天分目录导出
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user