feat(app): a call still being said lets the brain get ready

A partial transcript that call detection already reads as a request is sent
to the worker as prepare, so the intent judge runs while the speaker talks.
The live round trip now times the earcon and the answer's own sound apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-12 12:25:15 +09:00
parent 46e4e75d05
commit b88e20134f
6 changed files with 96 additions and 13 deletions

View File

@@ -441,6 +441,11 @@ impl DiscordCore {
self.inner.worker.addressed(id, user, text)
}
/// Tell the brain a call from `user` is being said; nothing comes back.
pub fn prepare(&self, user: u64, text: &str) {
self.inner.worker.prepare(user, text);
}
/// Ask the brain to rank candidates `(id, user, text)`; the answer comes as `CoreEvent::Ranked`.
pub fn ask_rank(&self, id: &str, candidates: &[(String, u64, String)]) -> bool {
self.inner.worker.rank(id, candidates)