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
@@ -0,0 +1,45 @@
//! Write a TODO item.
use crate::tools::{Tool, ToolCtx};
use anyhow::Result;
use serde_json::{json, Value};
pub struct Todowrite;
impl Tool for Todowrite {
fn name(&self) -> &'static str {
"todowrite"
}
fn description(&self) -> &'static str {
"Add an item to the TODO list"
}
fn parameters(&self) -> Value {
json!({
"type": "object",
"properties": {
"item": {
"type": "string",
"description": "TODO item text"
},
"priority": {
"type": "string",
"enum": ["high", "medium", "low"],
"description": "Priority level"
}
},
"required": ["item"]
})
}
fn run(&self, _ctx: &ToolCtx, args: &Value) -> Result<String> {
let item = crate::tools::arg_str(args, "item")?;
let priority = args
.get("priority")
.and_then(|v| v.as_str())
.unwrap_or("medium");
Ok(format!("[{}] TODO added: {}", priority, item))
}
}