legco_ai_assistant/backend/app/routers
Woody 78d1f8cc91 feat: delta-based ASR transcript — use text field, utterance boundaries, stash on pause
Replace full_text responses with character-level deltas computed from
DashScope's monotonically-growing 'text' field. Stash-only events (empty
text) are skipped; trailing stash chars sent alongside deltas and
appended on pause to complete final sentences.

Backend:
- Delta = text[len(prev_text):] — simple suffix diff, no merge logic
- Track item_id for utterance boundaries, prepend space separator
- Send stash alongside delta for frontend pause handler

Frontend:
- Accumulate deltas locally (transcriptRef += msg.delta)
- Store lastStashRef from each message
- On pause: append stash to text, fire onFinalTranscript

Plan: .plans/phase2_enhancement_delta_sse.md updated to Complete
2026-05-07 11:26:19 +08:00
..
__init__.py feat: Phase 1.1 project setup with config, database, and models 2026-04-22 16:13:52 +08:00
chunks.py feat: track highlight generation prompt, response, and timing in history (Phase 5.5) 2026-04-29 11:18:21 +08:00
documents.py feat: add chunk PDF serving endpoint and frontend clickable source links (1.5.6) 2026-04-24 11:49:39 +08:00
history.py feat(history): Phase 3.5 — Query History backend (service, API, timing, XML capture) 2026-04-25 22:59:53 +08:00
ingest.py feat(ingest): generate per-chunk PDFs for DOCX/TXT documents (Phase 5.3) 2026-04-28 17:32:22 +08:00
prompts.py feat: configurable SubQuestions via Step 1.2 system prompt page 2026-05-04 17:22:14 +08:00
query.py feat: wire LLMClientDP into query decompose pipeline (Phase 6) 2026-05-04 14:59:08 +08:00
video.py fix: Phase 2 ASR pipeline — 9 bugs resolved, Full Transcript works end-to-end 2026-05-06 18:26:17 +08:00
ws_asr.py feat: delta-based ASR transcript — use text field, utterance boundaries, stash on pause 2026-05-07 11:26:19 +08:00