feat: 支持统计龙王和潜水排名

This commit is contained in:
digua
2025-11-28 18:15:38 +08:00
parent e2dcd4080f
commit 2f4fbeaae8
9 changed files with 411 additions and 5 deletions

View File

@@ -12,6 +12,8 @@ import type {
RepeatAnalysis,
CatchphraseAnalysis,
NightOwlAnalysis,
DragonKingAnalysis,
DivingAnalysis,
} from '../../src/types/chat'
// Custom APIs for renderer
@@ -190,6 +192,26 @@ const chatApi = {
): Promise<NightOwlAnalysis> => {
return ipcRenderer.invoke('chat:getNightOwlAnalysis', sessionId, filter)
},
/**
* 获取龙王分析数据
*/
getDragonKingAnalysis: (
sessionId: string,
filter?: { startTs?: number; endTs?: number }
): Promise<DragonKingAnalysis> => {
return ipcRenderer.invoke('chat:getDragonKingAnalysis', sessionId, filter)
},
/**
* 获取潜水分析数据
*/
getDivingAnalysis: (
sessionId: string,
filter?: { startTs?: number; endTs?: number }
): Promise<DivingAnalysis> => {
return ipcRenderer.invoke('chat:getDivingAnalysis', sessionId, filter)
},
}
// Use `contextBridge` APIs to expose Electron APIs to