fix: the conflict_with in no-session arg (#2531)

This commit is contained in:
Lifei Zhou
2025-05-14 18:01:02 +10:00
committed by GitHub
parent 59631e2b10
commit 24a8195702
3 changed files with 3 additions and 3 deletions
+1 -2
View File
@@ -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,
+1
View File
@@ -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
+1 -1
View File
@@ -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))