mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-04-25 21:32:41 +08:00
feat: 新增斗图榜
This commit is contained in:
@@ -536,6 +536,26 @@ const mainIpcMain = (win: BrowserWindow) => {
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* 获取斗图分析数据
|
||||
*/
|
||||
ipcMain.handle(
|
||||
'chat:getMemeBattleAnalysis',
|
||||
async (_, sessionId: string, filter?: { startTs?: number; endTs?: number }) => {
|
||||
try {
|
||||
return await worker.getMemeBattleAnalysis(sessionId, filter)
|
||||
} catch (error) {
|
||||
console.error('获取斗图分析失败:', error)
|
||||
return {
|
||||
longestBattle: null,
|
||||
rankByCount: [],
|
||||
rankByImageCount: [],
|
||||
totalBattles: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
export default mainIpcMain
|
||||
|
||||
Reference in New Issue
Block a user