feat(tui): add usage overlay and sidebar for displaying usage statistics and tasks
feat(tui): implement status bar with connection and turn state indicators feat(tui): create workflow panel for agent status and progress visualization feat(web): introduce web frontend interface with static file serving feat(ws): add WebSocket interface for real-time communication and session management
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
//! Hive-mind live tracking — track running node statuses in real time.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Mutex;
|
||||
|
||||
/// Real-time status of all running hive-mind nodes.
|
||||
pub struct LiveHiveMind {
|
||||
nodes: Mutex<HashMap<String, String>>,
|
||||
}
|
||||
|
||||
impl LiveHiveMind {
|
||||
pub fn new() -> Self {
|
||||
LiveHiveMind {
|
||||
nodes: Mutex::new(HashMap::new()),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_status(&self, agent_id: &str, status: &str) {
|
||||
if let Ok(mut guard) = self.nodes.lock() {
|
||||
guard.insert(agent_id.to_string(), status.to_string());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_statuses(&self) -> HashMap<String, String> {
|
||||
self.nodes.lock().map(|g| g.clone()).unwrap_or_default()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user