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:
@@ -343,6 +343,11 @@ impl WorkerClient {
|
||||
self.send_json(json!({"type": "addressed", "id": id, "user": user.to_string(), "text": text}))
|
||||
}
|
||||
|
||||
/// Tell the brain a call is being said (a partial transcript), so it gets ready to answer it.
|
||||
pub fn prepare(&self, user: u64, text: &str) -> bool {
|
||||
self.send_json(json!({"type": "prepare", "user": user.to_string(), "text": text}))
|
||||
}
|
||||
|
||||
/// Ask the brain to rank tied candidates `(id, user, text)` by importance.
|
||||
pub fn rank(&self, id: &str, candidates: &[(String, u64, String)]) -> bool {
|
||||
let list: Vec<Value> = candidates.iter()
|
||||
|
||||
Reference in New Issue
Block a user