Commit graph

2 commits

Author SHA1 Message Date
vrubelroman
729f6eb47e Hold viewer message until AI reply is ready, when requested
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 30s
Previously the viewer's message displayed immediately and the AI
reply showed up whenever DeepSeek happened to respond, landing with
an awkward gap. Now, when the AI checkbox is checked, both texts are
fetched/prepared before anything is broadcast, so the original
message and the AI reply queue back-to-back on the overlay. Falls
back to just showing the original message if the AI call fails.
Behavior without the checkbox is unchanged (still immediate).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-01 17:39:33 +00:00
vrubelroman
2799dfdf42 Add optional AI reply via DeepSeek
Some checks failed
CI/CD Pipeline / build-and-deploy (push) Failing after 3s
Viewers can check a box on the send page to get a short AI-generated
reply to their message, voiced with a distinct TTS voice and queued
on the overlay after the original message. The system prompt lives
in ai-prompt.txt (editable without touching code) instead of being
hardcoded. TTS for both viewer messages and AI replies now announces
who it's from ("Сообщение от X." / "Ответ от ИИ.") before the text.
No-ops entirely if DEEPSEEK_API_KEY isn't set.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-01 17:23:41 +00:00