feat: add WebVTT context generation to chat WebSocket endpoint

- Import topics_to_webvtt_named and recordings controller
- Add _get_is_multitrack helper function
- Generate WebVTT context on WebSocket connection
- Add get_context message type to retrieve WebVTT
- Maintain backward compatibility with echo for other messages
- Add test fixture and test for WebVTT context generation

Implements task fn-1.2: WebVTT context generation for transcript chat
This commit is contained in:
Igor Loskutov
2026-01-12 18:21:10 -05:00
parent 7ca9cad937
commit 316f7b316d
41 changed files with 10730 additions and 0 deletions

22
.flow/specs/fn-1.4.md Normal file
View File

@@ -0,0 +1,22 @@
# Task 4: Register WebSocket Route
**File:** `server/reflector/app.py` (modify)
**Lines:** ~3
**Dependencies:** Task 3
## Objective
Register chat router in FastAPI app.
## Implementation
```python
# Add import
from reflector.views.transcripts_chat import router as transcripts_chat_router
# Add to route registration section
app.include_router(transcripts_chat_router, prefix="/v1", tags=["transcripts"])
```
## Validation
- [ ] Route appears in OpenAPI docs at `/docs`
- [ ] WebSocket endpoint accessible from frontend
- [ ] No import errors