Enable recipe deeplink parameters for pre-population (#5757)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Kai Lu
2025-12-03 07:45:25 -08:00
committed by GitHub
parent 039a845c42
commit 5d53643b61
8 changed files with 295 additions and 40 deletions
+26 -4
View File
@@ -379,6 +379,14 @@ enum RecipeCommand {
help = "recipe name to get recipe file or full path to the recipe file to generate deeplink"
)]
recipe_name: String,
/// Recipe parameters in key=value format (can be specified multiple times)
#[arg(
short = 'p',
long = "param",
value_name = "KEY=VALUE",
help = "Recipe parameter in key=value format (can be specified multiple times)"
)]
params: Vec<String>,
},
/// Open a recipe in Goose Desktop
@@ -387,6 +395,14 @@ enum RecipeCommand {
/// Recipe name to get recipe file to open
#[arg(help = "recipe name or full path to the recipe file")]
recipe_name: String,
/// Recipe parameters in key=value format (can be specified multiple times)
#[arg(
short = 'p',
long = "param",
value_name = "KEY=VALUE",
help = "Recipe parameter in key=value format (can be specified multiple times)"
)]
params: Vec<String>,
},
/// List available recipes
@@ -1448,11 +1464,17 @@ pub async fn cli() -> anyhow::Result<()> {
RecipeCommand::Validate { recipe_name } => {
handle_validate(&recipe_name)?;
}
RecipeCommand::Deeplink { recipe_name } => {
handle_deeplink(&recipe_name)?;
RecipeCommand::Deeplink {
recipe_name,
params,
} => {
handle_deeplink(&recipe_name, &params)?;
}
RecipeCommand::Open { recipe_name } => {
handle_open(&recipe_name)?;
RecipeCommand::Open {
recipe_name,
params,
} => {
handle_open(&recipe_name, &params)?;
}
RecipeCommand::List { format, verbose } => {
handle_list(&format, verbose)?;