feat: 夜猫分析模块

This commit is contained in:
digua
2025-11-28 18:05:16 +08:00
parent 72605a6ef4
commit e2dcd4080f
7 changed files with 668 additions and 13 deletions

View File

@@ -11,6 +11,7 @@ import type {
ImportProgress,
RepeatAnalysis,
CatchphraseAnalysis,
NightOwlAnalysis,
} from '../../src/types/chat'
// Custom APIs for renderer
@@ -179,6 +180,16 @@ const chatApi = {
): Promise<CatchphraseAnalysis> => {
return ipcRenderer.invoke('chat:getCatchphraseAnalysis', sessionId, filter)
},
/**
* 获取夜猫分析数据
*/
getNightOwlAnalysis: (
sessionId: string,
filter?: { startTs?: number; endTs?: number }
): Promise<NightOwlAnalysis> => {
return ipcRenderer.invoke('chat:getNightOwlAnalysis', sessionId, filter)
},
}
// Use `contextBridge` APIs to expose Electron APIs to