fix: added url encoding and decoding for goose recipe url (#2845)

This commit is contained in:
Lifei Zhou
2025-06-10 23:02:10 +10:00
committed by GitHub
parent 1a73708a2f
commit f23fc192e4
4 changed files with 6 additions and 2 deletions

View File

@@ -64,6 +64,7 @@ http = "1.0"
webbrowser = "1.0"
indicatif = "0.17.11"
urlencoding = "2"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["wincred"] }

View File

@@ -47,7 +47,8 @@ pub fn handle_deeplink(recipe_name: &str) -> Result<()> {
style("").green().bold(),
recipe.title
);
println!("goose://recipe?config={}", deeplink);
let url_safe = urlencoding::encode(&deeplink);
println!("goose://recipe?config={}", url_safe);
}
Ok(())
}