fix: recordings keep only what was played, newest waiting request kept, video pages opened play

- Playback tells the worker how much of each request was played (tts_played); the worker keeps a
  spoken answer's recording only that far (an answer stopped mid-way no longer keeps its unheard
  rest, and is marked stopped); nothing played or never reported: no file.
- Old recording day folders are also removed with the first recording of each new day.
- response.interrupt off, latest: a request whose final comes after a newer one's is replaced
  instead of replacing it.
- botBrowser presses play on a page's paused main player also after open, not only after a click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-16 15:56:40 +09:00
parent fdcaae4820
commit ec2672cd4a
12 changed files with 176 additions and 33 deletions

View File

@@ -564,6 +564,10 @@ impl TtsBackend for WorkerClient {
fn tts_cancel(&self, id: &str) {
self.send_json(json!({"type": "tts_cancel", "id": id}));
}
fn tts_played(&self, id: &str, played: u32, cancelled: bool) {
self.send_json(json!({"type": "tts_played", "id": id, "played": played, "cancelled": cancelled}));
}
}
fn mark_disconnected(inner: &Inner) {