summaryrefslogtreecommitdiff
path: root/makima/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/bin')
-rw-r--r--makima/src/bin/makima.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/makima/src/bin/makima.rs b/makima/src/bin/makima.rs
index 649a8e7..35783dc 100644
--- a/makima/src/bin/makima.rs
+++ b/makima/src/bin/makima.rs
@@ -321,6 +321,18 @@ async fn run_supervisor(
let result = client.supervisor_status(args.contract_id).await?;
println!("{}", serde_json::to_string(&result.0)?);
}
+ SupervisorCommand::Ask(args) => {
+ let client = ApiClient::new(args.common.api_url, args.common.api_key)?;
+ eprintln!("Asking user: {}...", args.question);
+ let choices = args
+ .choices
+ .map(|c| c.split(',').map(|s| s.trim().to_string()).collect())
+ .unwrap_or_default();
+ let result = client
+ .supervisor_ask(&args.question, choices, args.context, args.timeout)
+ .await?;
+ println!("{}", serde_json::to_string(&result.0)?);
+ }
}
Ok(())