feat(eo): complete EO simulation flow (T1 + T3) with Gemini transcription

- Gemini batch transcription (no Deepgram live)
- blobToBase64 helper (shared/lib/audio.ts)
- AudioRecorder: remove onChunk, add maxSeconds/onMaxReached auto-submit
- Timer stops at maxSeconds and triggers auto-submission
- EnregistrementEOPage: audioBase64 to backend, fix race condition step=done
- SimulationFlowProvider: submitEoAudio(audioBase64, mimeType, nclcCible)
- MIME normalization (strip codec params)
- Split CORRECTION_EE_TIMEOUT_MS (60s) / CORRECTION_EO_TIMEOUT_MS (120s)
- PresentationGenereeT1Page: localStorage persistence

Typecheck: OK · Tests: 159/159 

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hermann_Kitio 2026-04-25 08:28:51 +03:00
parent 71c1ad3018
commit d1c8b548bb
34 changed files with 3255 additions and 70 deletions

View file

@ -0,0 +1,23 @@
/**
* Appels API du domaine `presentation` Sprint 4c-2.
*
* `POST /presentations/generate` : timeout 25 s (DeepSeek peut mettre 10-20 s),
* retry désactivé volontairement un POST non-idempotent qui consomme un
* appel DeepSeek ne doit pas être rejoué silencieusement sur erreur réseau.
*/
import { apiFetch } from '@/shared/lib/api-client'
import type { PresentationGenerated, PresentationReponses } from './types'
const GENERATE_TIMEOUT_MS = 25_000
export function generatePresentation(
reponses: PresentationReponses,
): Promise<PresentationGenerated> {
return apiFetch<PresentationGenerated>('/presentations/generate', {
method: 'POST',
body: { reponses },
timeoutMs: GENERATE_TIMEOUT_MS,
retry: { max: 0, baseDelayMs: 0 },
})
}