feat(conversation): what is said in pieces is answered once, and a dropped answer stops the brain
Live 2026-11-19 every piece of one thought (pauses of 0.1-4.7 s) was answered on its own and the brain wrote each cancelled answer to its end, so the replies queued up to 35 s. - conversation: a speaker who goes on before their answer is heard (within call.continueMs, default 5 s) has the earlier request taken back (policy withdraw, not missed) and the joined text answered as one request; a stop still stops; no second earcon; partials prepare the joined text - voice worker: a reply cancelled while waiting is never started, a running one stops at the engine's next model or tool call (turn_state.cancel), and it uses up no turn, so a confirmation carried by the joined request does not lapse - specs: conversation.spec.md (Going on), voice_worker.spec.md, llm_contexts.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -254,6 +254,21 @@ impl Policy {
|
||||
}
|
||||
}
|
||||
|
||||
/// The request is taken back before its answer was heard: its speaker went on talking and it is
|
||||
/// joined to what they said next (conversation.spec.md, "Going on"). Not a missed request. When
|
||||
/// it is the running answer it is stopped; nothing else starts until the joined request comes.
|
||||
pub fn withdraw(&mut self, id: u64) -> Vec<Action> {
|
||||
if self.current.as_ref().is_some_and(|r| r.id == id) {
|
||||
self.current = None;
|
||||
return vec![Action::StopAnswer(id)];
|
||||
}
|
||||
self.waiting.retain(|r| r.id != id);
|
||||
if self.ranking.as_ref().is_some_and(|r| r.ids.contains(&id)) {
|
||||
self.ranking = None;
|
||||
}
|
||||
vec![]
|
||||
}
|
||||
|
||||
/// A stop command: stop the answer and drop everything waiting.
|
||||
pub fn stop(&mut self) -> Vec<Action> {
|
||||
let mut out = vec![];
|
||||
|
||||
Reference in New Issue
Block a user