used recipe id or deeplink to start agent (#5154)

This commit is contained in:
Lifei Zhou
2025-10-16 08:36:40 +11:00
committed by GitHub
parent 04faf59bc2
commit a6d0666ffd
15 changed files with 357 additions and 184 deletions
@@ -295,7 +295,7 @@ export default function CreateEditRecipeModal({
try {
const recipe = getCurrentRecipe();
await saveRecipe(recipe, recipeId);
let saved_recipe_id = await saveRecipe(recipe, recipeId);
// Close modal first
onClose(true);
@@ -306,9 +306,9 @@ export default function CreateEditRecipeModal({
undefined,
undefined,
undefined,
recipe,
undefined,
recipeId ?? undefined
undefined,
saved_recipe_id
);
toastSuccess({
@@ -183,13 +183,21 @@ export default function CreateRecipeFromSessionModal({
extensions: [], // Will be populated based on current extensions
};
await saveRecipe(recipe, null);
let recipeId = await saveRecipe(recipe, null);
onRecipeCreated?.(recipe);
onClose();
if (runAfterSave) {
window.electron.createChatWindow(undefined, undefined, undefined, undefined, recipe);
window.electron.createChatWindow(
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
recipeId
);
}
} catch (error) {
console.error('Failed to create recipe:', error);