mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-05-15 11:02:10 +08:00
feat: 新增复读分析
This commit is contained in:
Vendored
+2
@@ -7,6 +7,7 @@ import type {
|
||||
DailyActivity,
|
||||
MessageType,
|
||||
ImportProgress,
|
||||
RepeatAnalysis,
|
||||
} from '../../src/types/chat'
|
||||
|
||||
interface TimeFilter {
|
||||
@@ -33,6 +34,7 @@ interface ChatApi {
|
||||
getDbDirectory: () => Promise<string | null>
|
||||
getSupportedFormats: () => Promise<Array<{ name: string; platform: string }>>
|
||||
onImportProgress: (callback: (progress: ImportProgress) => void) => () => void
|
||||
getRepeatAnalysis: (sessionId: string, filter?: TimeFilter) => Promise<RepeatAnalysis>
|
||||
}
|
||||
|
||||
interface Api {
|
||||
|
||||
@@ -8,6 +8,7 @@ import type {
|
||||
DailyActivity,
|
||||
MessageType,
|
||||
ImportProgress,
|
||||
RepeatAnalysis,
|
||||
} from '../../src/types/chat'
|
||||
|
||||
// Custom APIs for renderer
|
||||
@@ -152,6 +153,13 @@ const chatApi = {
|
||||
ipcRenderer.removeListener('chat:importProgress', handler)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取复读分析数据
|
||||
*/
|
||||
getRepeatAnalysis: (sessionId: string, filter?: { startTs?: number; endTs?: number }): Promise<RepeatAnalysis> => {
|
||||
return ipcRenderer.invoke('chat:getRepeatAnalysis', sessionId, filter)
|
||||
},
|
||||
}
|
||||
|
||||
// Use `contextBridge` APIs to expose Electron APIs to
|
||||
|
||||
Reference in New Issue
Block a user