diff --git a/includes/BvjAnalyzerAgent.php b/includes/BvjAnalyzerAgent.php index 467bf92..568908e 100644 --- a/includes/BvjAnalyzerAgent.php +++ b/includes/BvjAnalyzerAgent.php @@ -359,7 +359,8 @@ final class DbnBvjAnalyzerAgent $synthesis = $this->synthesiseBvj( $docText, $docMeta, $parties, $timelineEvents, $subQuestions, $numberedSources, - $advocateRole, $engine, $language, $controls['temperature'], $additionalNotes + $advocateRole, $engine, $language, $controls['temperature'], $additionalNotes, + $emit ); $this->stepTimings['synthesis'] = $this->elapsedMs($stepStart); $emitStep('synthesis', 'Synthesis', @@ -685,17 +686,18 @@ PROMPT; // ── Step 6: Synthesis ───────────────────────────────────────────────────── private function synthesiseBvj( - string $docText, - array $docMeta, - array $parties, - array $timelineEvents, - array $subQuestions, - array $numberedSources, - string $advocateRole, - string $engine, - string $language, - float $temperature, - string $additionalNotes + string $docText, + array $docMeta, + array $parties, + array $timelineEvents, + array $subQuestions, + array $numberedSources, + string $advocateRole, + string $engine, + string $language, + float $temperature, + string $additionalNotes, + ?callable $emit = null ): array { $locale = $language === 'no' ? 'Norwegian' : 'English'; $roleStr = $advocateRole !== '' ? $advocateRole : 'the affected party';