fix: make ids_or_tags optional for non-required modes

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-29 14:18:50 -03:00
parent d32a460e38
commit 6b632ff244

View File

@@ -18,6 +18,7 @@ pub struct Args {
#[arg(help("A list of either item IDs or tags"))]
#[arg(value_parser = clap::value_parser!(NumberOrString))]
#[arg(required = false)]
pub ids_or_tags: Vec<NumberOrString>,
}
@@ -45,11 +46,11 @@ pub struct ModeArgs {
pub list: bool,
#[arg(group("mode"), help_heading("Mode Options"), short, long, conflicts_with_all(["save", "get", "diff", "list", "info", "status"]), requires("ids_or_tags"))]
#[arg(group("mode"), help_heading("Mode Options"), short, long, conflicts_with_all(["save", "get", "diff", "list", "info", "status"]))]
#[arg(help("Delete items either by ID or by matching tags"))]
pub delete: bool,
#[arg(group("mode"), help_heading("Mode Options"), short, long, conflicts_with_all(["save", "get", "diff", "list", "delete", "status"]), requires("ids_or_tags"))]
#[arg(group("mode"), help_heading("Mode Options"), short, long, conflicts_with_all(["save", "get", "diff", "list", "delete", "status"]))]
#[arg(help(
"Get an item either by it's ID or by a combination of matching tags and metatdata"
))]