Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/goose-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
3 changes: 2 additions & 1 deletion crates/goose-cli/src/commands/recipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down
3 changes: 2 additions & 1 deletion ui/desktop/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,10 @@ app.on('open-url', async (_event, url) => {
if (parsedUrl.hostname === 'bot' || parsedUrl.hostname === 'recipe') {
let recipeConfig = null;
const configParam = parsedUrl.searchParams.get('config');
const base64 = decodeURIComponent(configParam || '');
if (configParam) {
try {
recipeConfig = JSON.parse(Buffer.from(configParam, 'base64').toString('utf-8'));
recipeConfig = JSON.parse(Buffer.from(base64, 'base64').toString('utf-8'));
} catch (e) {
console.error('Failed to parse bot config:', e);
}
Expand Down
Loading