perf: track execution duration by state and bound summary I/O

This commit is contained in:
mesalogo
2026-10-04 16:21:55 +08:00
parent 2c2b6c31eb
commit 4d18794e74
31 changed files with 987 additions and 1397 deletions
+5
View File
@@ -1273,6 +1273,11 @@ const desktopApi: DesktopApi = {
ipcRenderer.invoke(ipcChannels.tasksList) as Promise<AssistantTask[]>,
getExecutionStats: (input) =>
ipcRenderer.invoke(ipcChannels.tasksExecutionStats, input) as Promise<ExecutionStats>,
onExecutionStatsChanged: (listener) => {
const handler = (): void => listener()
ipcRenderer.on(ipcChannels.tasksExecutionStatsChanged, handler)
return () => { ipcRenderer.removeListener(ipcChannels.tasksExecutionStatsChanged, handler) }
},
setStatus: async (
taskId: string,
status: 'completed' | 'cancelled'