diff --git a/crates/goose-cli/src/cli.rs b/crates/goose-cli/src/cli.rs index 32337bff94..261470d743 100644 --- a/crates/goose-cli/src/cli.rs +++ b/crates/goose-cli/src/cli.rs @@ -320,8 +320,7 @@ enum Command { long = "no-session", help = "Run without storing a session file", long_help = "Execute commands without creating or using a session file. Useful for automated runs.", - conflicts_with = "resume", - conflicts_with = "identifier" + conflicts_with_all = ["resume", "name", "path"] )] no_session: bool, diff --git a/crates/goose/src/config/base.rs b/crates/goose/src/config/base.rs index 2863608282..71086656a4 100644 --- a/crates/goose/src/config/base.rs +++ b/crates/goose/src/config/base.rs @@ -346,6 +346,7 @@ impl Config { let mut file = OpenOptions::new() .write(true) .create(true) + .truncate(false) .open(&self.config_path)?; // Acquire an exclusive lock for the entire operation diff --git a/crates/goose/src/providers/google.rs b/crates/goose/src/providers/google.rs index ac35e98d79..8182d3b06e 100644 --- a/crates/goose/src/providers/google.rs +++ b/crates/goose/src/providers/google.rs @@ -184,7 +184,7 @@ impl Provider for GoogleProvider { let mut models: Vec = arr .iter() .filter_map(|m| m.get("name").and_then(|v| v.as_str())) - .map(|name| name.split('/').last().unwrap_or(name).to_string()) + .map(|name| name.split('/').next_back().unwrap_or(name).to_string()) .collect(); models.sort(); Ok(Some(models))