prediction: toolbox: add documentation hints to the task list args

This commit is contained in:
2026-06-26 10:20:33 +02:00
parent f4e1adfd4a
commit c0e05fb2bb
+5 -2
View File
@@ -63,12 +63,15 @@ pub struct ArchiveToolbox {
#[derive(Debug, Deserialize, Serialize, JsonSchema)] #[derive(Debug, Deserialize, Serialize, JsonSchema)]
enum TaskListOperation { enum TaskListOperation {
/// Marks the given task as complete
Complete(String), Complete(String),
/// Adds a new item to the task list
Add(String) Add(String)
} }
/// # A sequence of operations to apply to the task list
#[derive(Debug, Deserialize, Serialize, JsonSchema, Default)] #[derive(Debug, Deserialize, Serialize, JsonSchema, Default)]
struct TaskListArgs { struct TaskListOperations {
operations: Vec<TaskListOperation> operations: Vec<TaskListOperation>
} }
@@ -111,7 +114,7 @@ impl Toolbox for ArchiveToolbox {
impl ArchiveToolbox { impl ArchiveToolbox {
async fn tasklist_operation(&mut self, json_args: &str) -> Result<ToolResults, ToolError> { async fn tasklist_operation(&mut self, json_args: &str) -> Result<ToolResults, ToolError> {
let args: TaskListArgs = serde_json::from_str(json_args)?; let args: TaskListOperations = serde_json::from_str(json_args)?;
let mut locked = self.todo_list.lock().await; let mut locked = self.todo_list.lock().await;