mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-04-23 01:39:37 +08:00
feat: 支持统计龙王和潜水排名
This commit is contained in:
4
electron/preload/index.d.ts
vendored
4
electron/preload/index.d.ts
vendored
@@ -11,6 +11,8 @@ import type {
|
||||
RepeatAnalysis,
|
||||
CatchphraseAnalysis,
|
||||
NightOwlAnalysis,
|
||||
DragonKingAnalysis,
|
||||
DivingAnalysis,
|
||||
} from '../../src/types/chat'
|
||||
|
||||
interface TimeFilter {
|
||||
@@ -41,6 +43,8 @@ interface ChatApi {
|
||||
getRepeatAnalysis: (sessionId: string, filter?: TimeFilter) => Promise<RepeatAnalysis>
|
||||
getCatchphraseAnalysis: (sessionId: string, filter?: TimeFilter) => Promise<CatchphraseAnalysis>
|
||||
getNightOwlAnalysis: (sessionId: string, filter?: TimeFilter) => Promise<NightOwlAnalysis>
|
||||
getDragonKingAnalysis: (sessionId: string, filter?: TimeFilter) => Promise<DragonKingAnalysis>
|
||||
getDivingAnalysis: (sessionId: string, filter?: TimeFilter) => Promise<DivingAnalysis>
|
||||
}
|
||||
|
||||
interface Api {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user