From 4485c49c9be844fd76ecbb92601c02669777aca2 Mon Sep 17 00:00:00 2001 From: Shirone Date: Sun, 25 Jan 2026 11:36:53 +0100 Subject: [PATCH] feat: Enhance auto mode service with summary extraction and saving - Added functionality to extract and save the final summary from multi-task or single-agent execution in the auto mode service. - Updated event types in the query invalidation hook to include 'auto_mode_task_started' and 'auto_mode_task_complete' for better event handling. --- apps/server/src/services/auto-mode-service.ts | 7 +++++++ apps/ui/src/hooks/use-query-invalidation.ts | 2 ++ 2 files changed, 9 insertions(+) diff --git a/apps/server/src/services/auto-mode-service.ts b/apps/server/src/services/auto-mode-service.ts index fad4f9c1..53d24141 100644 --- a/apps/server/src/services/auto-mode-service.ts +++ b/apps/server/src/services/auto-mode-service.ts @@ -4808,6 +4808,13 @@ After generating the revised spec, output: } } + // Extract and save final summary from multi-task or single-agent execution + // Note: saveFeatureSummary already emits auto_mode_summary event + const summary = extractSummary(responseText); + if (summary) { + await this.saveFeatureSummary(projectPath, featureId, summary); + } + logger.info(`Implementation completed for feature ${featureId}`); // Exit the original stream loop since continuation is done break streamLoop; diff --git a/apps/ui/src/hooks/use-query-invalidation.ts b/apps/ui/src/hooks/use-query-invalidation.ts index 46577a8d..324a86fb 100644 --- a/apps/ui/src/hooks/use-query-invalidation.ts +++ b/apps/ui/src/hooks/use-query-invalidation.ts @@ -47,6 +47,8 @@ const SINGLE_FEATURE_INVALIDATION_EVENTS: AutoModeEvent['type'][] = [ 'auto_mode_phase', 'auto_mode_phase_complete', 'auto_mode_task_status', + 'auto_mode_task_started', + 'auto_mode_task_complete', 'auto_mode_summary', ];