send typing notice while claude is processing
This commit is contained in:
parent
c8eb9870a9
commit
f05ce0ee2b
1 changed files with 13 additions and 1 deletions
14
src/main.rs
14
src/main.rs
|
|
@ -638,7 +638,19 @@ async fn process_loop(state: Arc<Mutex<DaemonState>>, client: Client) {
|
|||
_ => 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,
|
||||
Err(e) => {
|
||||
tracing::error!(room = %room_id, "claude invocation failed: {e}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue