prediction: toolbox: add documentation hints to the task list args
This commit is contained in:
@@ -63,12 +63,15 @@ pub struct ArchiveToolbox {
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
|
||||
enum TaskListOperation {
|
||||
/// Marks the given task as complete
|
||||
Complete(String),
|
||||
/// Adds a new item to the task list
|
||||
Add(String)
|
||||
}
|
||||
|
||||
/// # A sequence of operations to apply to the task list
|
||||
#[derive(Debug, Deserialize, Serialize, JsonSchema, Default)]
|
||||
struct TaskListArgs {
|
||||
struct TaskListOperations {
|
||||
operations: Vec<TaskListOperation>
|
||||
}
|
||||
|
||||
@@ -111,7 +114,7 @@ impl Toolbox for ArchiveToolbox {
|
||||
|
||||
impl ArchiveToolbox {
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user