Просмотр исходного кода

feat(speaking): show real total duration in overall report

Read totalDurationSeconds from the report response instead of hardcoding 0,
so the completion header reflects the actual session length.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jimmylee 1 неделя назад
Родитель
Сommit
48339fd0c5
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/views/Editor/EnglishSpeaking/services/llmService.ts

+ 2 - 1
src/views/Editor/EnglishSpeaking/services/llmService.ts

@@ -100,6 +100,7 @@ interface BackendReportResponse {
   rounds: BackendRound[]
   overall: BackendOverall | null
   summary: string | null
+  totalDurationSeconds: number | null
 }
 
 interface BackendOverall {
@@ -189,7 +190,7 @@ function adaptReport(raw: BackendReportResponse): DialogueReport {
         highestRound: highest?.round ?? 0,
         grammarErrors: 0,
         excellentExpressions: 0,
-        totalDuration: 0,
+        totalDuration: raw.totalDurationSeconds ?? 0,
       },
       sentenceEvaluations,
     },