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:
asepharyana
2026-07-20 09:04:57 +07:00
parent bceba665c0
commit da2ed6da25
454 changed files with 13979 additions and 29539 deletions
+61
View File
@@ -0,0 +1,61 @@
//! Plan management tools — enter and mark ready.
use crate::tools::{Tool, ToolCtx};
use anyhow::Result;
use serde_json::{json, Value};
pub struct PlanEnter;
impl Tool for PlanEnter {
fn name(&self) -> &'static str {
"plan_enter"
}
fn description(&self) -> &'static str {
"Enter a planning phase — present a structured plan for approval"
}
fn parameters(&self) -> Value {
json!({
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "The structured plan text"
}
},
"required": ["plan"]
})
}
fn run(&self, _ctx: &ToolCtx, args: &Value) -> Result<String> {
let plan_text = crate::tools::arg_str(args, "plan")?;
Ok(format!(
"Plan entered (length: {} chars). Waiting for approval...",
plan_text.len()
))
}
}
pub struct PlanReady;
impl Tool for PlanReady {
fn name(&self) -> &'static str {
"plan_ready"
}
fn description(&self) -> &'static str {
"Signal that the plan is ready and execution can begin"
}
fn parameters(&self) -> Value {
json!({
"type": "object",
"properties": {}
})
}
fn run(&self, _ctx: &ToolCtx, _args: &Value) -> Result<String> {
Ok("Plan is ready. Starting execution.".to_string())
}
}