feat: renamed the user__ask to user__select and improved descriptions to improve model usage
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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:?}"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user