send typing notice while claude is processing

This commit is contained in:
Damocles 2026-04-30 22:46:13 +02:00
parent c8eb9870a9
commit f05ce0ee2b

View file

@ -638,7 +638,19 @@ async fn process_loop(state: Arc<Mutex<DaemonState>>, client: Client) {
_ => None, _ => None,
}); });
let docs = match invoke_claude(&room_id, &room_name, &timeline, seen_idx, &model).await { // Tell the room we're "typing" while claude thinks. Best-effort; no
// hard fail if it doesn't go through.
if let Err(e) = room.typing_notice(true).await {
tracing::debug!(room = %room_id, "failed to send typing start: {e}");
}
let invoke_result = invoke_claude(&room_id, &room_name, &timeline, seen_idx, &model).await;
if let Err(e) = room.typing_notice(false).await {
tracing::debug!(room = %room_id, "failed to send typing stop: {e}");
}
let docs = match invoke_result {
Ok(d) => d, Ok(d) => d,
Err(e) => { Err(e) => {
tracing::error!(room = %room_id, "claude invocation failed: {e}"); tracing::error!(room = %room_id, "claude invocation failed: {e}");