feat: update goose selection (#1638)

This commit is contained in:
Yingjie He
2025-03-12 14:32:52 -07:00
committed by GitHub
parent ce23212974
commit 99f8126c2c
9 changed files with 401 additions and 185 deletions
+5 -5
View File
@@ -708,8 +708,8 @@ pub fn configure_goose_mode_dialog() -> Result<(), Box<dyn Error>> {
"All tools, extensions and file modificatio will require human approval"
)
.item(
"write_approve",
"Write Approve Mode",
"smart_approve",
"Smart Approve Mode",
"Editing, creating, deleting files and using extensions will require human approval"
)
.item(
@@ -728,9 +728,9 @@ pub fn configure_goose_mode_dialog() -> Result<(), Box<dyn Error>> {
config.set_param("GOOSE_MODE", Value::String("approve".to_string()))?;
cliclack::outro("Set to Approve Mode - all tools and modifications require approval")?;
}
"write_approve" => {
config.set_param("GOOSE_MODE", Value::String("write_approve".to_string()))?;
cliclack::outro("Set to Write Approve Mode - modifications require approval")?;
"smart_approve" => {
config.set_param("GOOSE_MODE", Value::String("smart_approve".to_string()))?;
cliclack::outro("Set to Smart Approve Mode - modifications require approval")?;
}
"chat" => {
config.set_param("GOOSE_MODE", Value::String("chat".to_string()))?;
+1 -1
View File
@@ -77,7 +77,7 @@ impl GooseCompleter {
/// Complete flags for the /mode command
fn complete_mode_flags(&self, line: &str) -> Result<(usize, Vec<Pair>)> {
let modes = ["auto", "approve", "write_approve", "chat"];
let modes = ["auto", "approve", "smart_approve", "chat"];
let parts: Vec<&str> = line.split_whitespace().collect();
+1 -1
View File
@@ -335,7 +335,7 @@ impl Session {
let mode = mode.to_lowercase();
// Check if mode is valid
if !["auto", "approve", "chat", "write_approve"].contains(&mode.as_str()) {
if !["auto", "approve", "chat", "smart_approve"].contains(&mode.as_str()) {
output::render_error(&format!(
"Invalid mode '{}'. Mode must be one of: auto, approve, chat",
mode