Send message by default mid turn. queue messages by tab (#9077)

https://github.com/user-attachments/assets/03838730-4ddc-44df-a2c7-cb8ecda78660
This commit is contained in:
Ahmed Ibrahim
2026-01-12 23:06:35 -08:00
committed by GitHub
parent e726a82c8a
commit cbca43d57a
24 changed files with 875 additions and 342 deletions

View File

@@ -1608,6 +1608,17 @@ impl Session {
}
}
pub async fn has_pending_input(&self) -> bool {
let active = self.active_turn.lock().await;
match active.as_ref() {
Some(at) => {
let ts = at.turn_state.lock().await;
ts.has_pending_input()
}
None => false,
}
}
pub async fn list_resources(
&self,
server: &str,
@@ -2904,6 +2915,9 @@ async fn try_run_turn(
.await;
should_emit_turn_diff = true;
needs_follow_up |= sess.has_pending_input().await;
error!("needs_follow_up: {needs_follow_up}");
break Ok(TurnRunResult {
needs_follow_up,
last_agent_message,