feat(tui): implement agent turn engine for background processing and enhance input handling

This commit is contained in:
asepharyana
2026-07-20 10:55:09 +07:00
parent da2ed6da25
commit 792695b65a
31 changed files with 603 additions and 153 deletions
+9 -1
View File
@@ -3,6 +3,8 @@
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use tracing::error;
use super::job::BashJob;
/// Central registry of all running background bash jobs.
@@ -37,7 +39,13 @@ impl BashControl {
/// List all active jobs.
pub fn list(&self) -> Vec<(String, String, bool)> {
let mut guard = self.jobs.lock().unwrap();
let mut guard = match self.jobs.lock() {
Ok(g) => g,
Err(poisoned) => {
error!("bgbash jobs mutex poisoned, recovering");
poisoned.into_inner()
}
};
guard.retain(|_, j| j.is_running());
guard
.iter()