feat: renamed the user__ask to user__select and improved descriptions to improve model usage

This commit is contained in:
2026-07-23 18:22:18 -06:00
parent 89fadcca15
commit a2c4f05c8c
5 changed files with 20 additions and 12 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ pub(in crate::config) const DEFAULT_USER_INTERACTION_INSTRUCTIONS: &str = indoc!
## User Interaction
You have built-in tools to interact with the user directly:
- `user__ask --question \"...\" --options [\"A\", \"B\", \"C\"]`: Present a selection prompt. Returns the chosen option.
- `user__select --question \"...\" --options [\"A\", \"B\", \"C\"]`: Present a single-select list of named options. Use this — not `user__confirm` — whenever there are 2+ named options. Returns the chosen option.
- `user__confirm --question \"...\"`: Ask a yes/no question. Returns \"yes\" or \"no\".
- `user__input --question \"...\"`: Request free-form text input from the user.
- `user__checkbox --question \"...\" --options [\"A\", \"B\", \"C\"]`: Multi-select prompt. Returns an array of selected options.
+3 -3
View File
@@ -4784,7 +4784,7 @@ mod tests {
let fns = ctx.select_functions(&role).unwrap();
let names: Vec<&str> = fns.iter().map(|f| f.name.as_str()).collect();
assert!(names.contains(&"todo__init"));
assert!(names.contains(&"user__ask"));
assert!(names.contains(&"user__select"));
}
#[test]
@@ -4848,7 +4848,7 @@ mod tests {
let fns = ctx.select_functions(&role).unwrap();
let names: Vec<&str> = fns.iter().map(|f| f.name.as_str()).collect();
assert!(names.contains(&"user__ask"));
assert!(names.contains(&"user__select"));
assert!(!names.contains(&"skill__list"));
}
@@ -4933,7 +4933,7 @@ mod tests {
"teammate tools must survive an agent tool filter, got: {names:?}"
);
assert!(
names.contains(&"user__ask"),
names.contains(&"user__select"),
"user__ tools must survive an agent tool filter, got: {names:?}"
);
}