fix(cli): wire up batch summary generation in CLI Web to fix page freeze

- Implement generateSummary/checkCanGenerateSummary in FetchSessionIndexAdapter
  via existing HTTP endpoints instead of stubs that returned instantly
- Add checkCanGenerate service function in summary-service.ts
- Add POST /_web/sessions/:id/summaries/check-can-generate route

The page froze because stub methods returned synchronously, causing a tight
loop of hundreds of Vue reactive updates without any network delay.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
diguaandCursor authored and digua committed 2026-05-27 23:47:27 +08:00
1 parent 63e101feb4
commit eaff16d555
3 files changed
+89 -8

No files matched your search

@@ -52,4 +52,12 @@ export function registerSummaryRoutes(
}
return result
})
server.post<{
Params: { id: string }
Body: { chatSessionIds: number[] }
}>('/_web/sessions/:id/summaries/check-can-generate', async (request) => {
const { chatSessionIds } = request.body
return summaryService.checkCanGenerate(adapter, request.params.id, chatSessionIds)
})
}