//! Tool for marking tasks as finished in the session's todo list.
useserde_json::{json,Value};
useanyhow::{Result,anyhow};
usestd::path::PathBuf;
usesuper::super::{Tool,ToolCtx};
/// Tool that marks tasks as finished in the session's todo.md.
pubstructTodofinish;
implToolforTodofinish{
fnname(&self)-> &'staticstr{
"todofinish"
}
fndescription(&self)-> &'staticstr{
"Mark tasks as finished in the session todo list (todo.md). You can mark all tasks as finished by leaving the 'task_index' empty, or specify a 1-based index to finish a specific task."
}
fnparameters(&self)-> Value{
json!({
"type": "object",
"properties": {
"task_index": {
"type": "integer",
"description": "Optional 1-based index of the task to mark as finished. If omitted, ALL unfinished tasks will be marked as finished."