Files
WechatExplorer/src/shared/group-report.ts
T
电摇小子 ae561e6340 feat: 更换日报功能模板
- ChatWindow 模型下拉框新增 deepseek-v4-pro /
  deepseek-v4-flash
  - 主进程 model 兜底值改为 deepseek-v4-flash
  - 同步更新 .env.example 默认模型
  - 修复旧 localStorage 中 gpt-5.5 等不支持的模型导致的
  400 报错
2026-07-10 15:40:35 +08:00

265 lines
5.2 KiB
TypeScript

export type ReportHeat = '高' | '中' | '低'
export type ReportMode = 'compact' | 'full'
export type ReportSectionKey =
| 'hero'
| 'topics'
| 'importantMessages'
| 'actions'
| 'moments'
| 'analytics'
| 'keywords'
| 'resources'
| 'qa'
| 'storylines'
| 'reversals'
| 'gallery'
| 'voices'
| 'badges'
| 'chains'
export interface ReportSectionMeta {
enabled: boolean
importance: number
confidence: number
totalCount: number
displayedCount: number
hiddenCount?: number
}
export interface ReportTopicConclusion {
text: string
sourceMessageIds?: string[]
}
export interface ReportTopic {
title: string
timeRange: string
heat: ReportHeat
participants: string[]
summary: string
conclusion?: string
conclusions?: ReportTopicConclusion[]
keywords: string[]
sourceMessageIds?: string[]
image?: {
imageUrl?: string
note: string
sourceMessageIds?: string[]
} | null
}
export interface ReportResource {
title: string
description: string
sender?: string
sourceMessageIds?: string[]
}
export interface ReportImportantMessage {
sender: string
time: string
content: string
note: string
sourceMessageIds?: string[]
importance?: number
confidence?: number
}
export interface ReportQuoteMessage {
sender: string
content: string
sourceMessageId?: string
}
export interface ReportQuote {
messages: ReportQuoteMessage[]
note: string
sourceMessageIds?: string[]
importance?: number
confidence?: number
}
export interface ReportQuestionAnswer {
question: string
answer: string
answerer?: string
sourceMessageIds?: string[]
}
export interface ReportTopicHeat {
topic: string
score: number
}
export interface ReportSpeakerRank {
name: string
count: number
}
export interface ReportHero {
headline: string
summary: string
keyTakeaway?: string
pendingNote?: string
statusLine?: string
}
export interface ReportMediaGalleryItem {
sender: string
time: string
imageUrl: string
note: string
stats?: string
inferenceLabel?: string
sourceMessageIds?: string[]
replyCount?: number
}
export interface ReportVoiceHighlight {
title: string
sender: string
note: string
sourceMessageIds?: string[]
}
export interface ReportVoiceLeaderboardItem {
sender: string
count: number
durationSec: number
}
export interface ReportFunBadge {
title: string
owner: string
note: string
}
export interface ReportTodoItem {
task: string
owner?: string | null
deadline?: string | null
topic?: string | null
note?: string
sourceMessageIds?: string[]
importance?: number
confidence?: number
}
export interface ReportUnresolvedItem {
question: string
owner?: string
status: '待跟进' | '暂未回答' | '进行中'
note: string
lastDiscussedAt?: string | null
sourceMessageIds?: string[]
importance?: number
confidence?: number
}
export interface ReportStorylineStage {
time: string
event: string
sourceMessageIds?: string[]
}
export interface ReportStoryline {
title: string
stages: ReportStorylineStage[]
result?: string
sourceMessageIds?: string[]
}
export interface ReportReversal {
topic: string
initialView: string
finalView: string
note?: string
sourceMessageIds?: string[]
}
export interface ReportParticipantChain {
topic: string
chain: string[]
note?: string
sourceMessageIds?: string[]
}
export interface ReportSummaryStats {
messageCount: number
activeUsers: number
topicCount: number
mediaCount: number
imageCount: number
voiceCount: number
stickerCount: number
conclusionCount: number
todoCount: number
unresolvedCount: number
}
export interface GroupDailyReport {
overview: string
mode?: ReportMode
hero?: ReportHero
topics: ReportTopic[]
resources: ReportResource[]
importantMessages: ReportImportantMessage[]
quotes: ReportQuote[]
qa: ReportQuestionAnswer[]
todos: ReportTodoItem[]
unresolved: ReportUnresolvedItem[]
storylines: ReportStoryline[]
reversals: ReportReversal[]
participantChains: ReportParticipantChain[]
analytics: {
topicHeat: ReportTopicHeat[]
activeTimeline: string
topSpeakers: ReportSpeakerRank[]
voiceLeaderboard: ReportVoiceLeaderboardItem[]
}
keywords: string[]
media: {
gallery: ReportMediaGalleryItem[]
voiceHighlights: ReportVoiceHighlight[]
funBadges: ReportFunBadge[]
}
summaryStats?: ReportSummaryStats
sectionMeta?: Partial<Record<ReportSectionKey, ReportSectionMeta>>
}
export interface GroupReportMetadata {
groupName: string
reportDate: string
dateRange: string
messageCount: number
activeUsers: number
imageCount?: number
voiceCount?: number
stickerCount?: number
mediaMessageCount?: number
timeSpan: string
generatedAt: string
recordNote: string
footerNote: string
heroParticipants: string[]
avatars: Record<string, string | undefined>
reportMode?: ReportMode
talker?: string
timeRange?: string
warnings?: string[]
}
export interface GroupReportExportRequest {
report: GroupDailyReport
metadata: GroupReportMetadata
}
export interface GroupReportExportResult {
success: boolean
htmlPath?: string
pngPath?: string
imageDataUrl?: string
warnings?: string[]
error?: string
}