used recipe id or deeplink to start agent (#5154)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user