mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
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:
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)
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user