mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
feat(ai): add summary strategy with brief and standard detail levels
Support two summary strategies (brief/standard) for AI-generated session summaries. Users can choose their preferred detail level in Settings > AI > Session Index. Standard (default) produces richer summaries covering people, events, and key details. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
eaff16d555
commit
6727ff609c
21 files changed
+173
-47
No files matched your search
@@ -25,12 +25,13 @@ export function registerSummaryRoutes(
|
||||
|
||||
server.post<{
|
||||
Params: { id: string }
|
||||
Body: { chatSessionId: number; locale?: string; forceRegenerate?: boolean }
|
||||
Body: { chatSessionId: number; locale?: string; forceRegenerate?: boolean; strategy?: 'brief' | 'standard' }
|
||||
}>('/_web/sessions/:id/summaries/generate', async (request, reply) => {
|
||||
const { chatSessionId, locale, forceRegenerate } = request.body
|
||||
const { chatSessionId, locale, forceRegenerate, strategy } = request.body
|
||||
const result = await summaryService.generateSummary(adapter, request.params.id, chatSessionId, deps, {
|
||||
locale,
|
||||
forceRegenerate,
|
||||
strategy,
|
||||
})
|
||||
if ('error' in result && !result.success) {
|
||||
return reply.code(400).send({ error: result.error })
|
||||
|
||||
Reference in new issue
Block a user