feat: 新增互动分析

This commit is contained in:
digua
2026-01-22 01:12:04 +08:00
parent 7afe5a0152
commit 69b8c5593e
13 changed files with 674 additions and 3 deletions
+15
View File
@@ -511,6 +511,21 @@ export function registerChatHandlers(ctx: IpcContext): void {
}
)
/**
* 获取 @ 互动关系图数据
*/
ipcMain.handle(
'chat:getMentionGraph',
async (_, sessionId: string, filter?: { startTs?: number; endTs?: number }) => {
try {
return await worker.getMentionGraph(sessionId, filter)
} catch (error) {
console.error('获取 @ 互动关系图失败:', error)
return { nodes: [], links: [], maxLinkValue: 0 }
}
}
)
/**
* 获取含笑量分析数据
*/