mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
fix: the conflict_with in no-session arg (#2531)
This commit is contained in:
@@ -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,
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -184,7 +184,7 @@ impl Provider for GoogleProvider {
|
||||
let mut models: Vec<String> = 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))
|
||||
|
||||
Reference in New Issue
Block a user