Skip to content

Commit 62d4e77

Browse files
earayu梅西
andauthored
fix(desktop): trust saved workflows (#23)
Co-authored-by: 梅西 <messi-agent@users.noreply.github.com>
1 parent e8983d9 commit 62d4e77

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ui/desktop/src/recipe/recipe_management.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@ export const saveRecipe = async (
66
recipeId?: string | null
77
): Promise<{ id: string; fileName: string; filePath: string }> => {
88
try {
9+
const recipeToSave = stripEmptyExtensions(recipe);
910
const response = await saveRecipeApi({
1011
body: {
11-
recipe: stripEmptyExtensions(recipe),
12+
recipe: recipeToSave,
1213
id: recipeId,
1314
},
1415
throwOnError: true,
1516
});
17+
try {
18+
await window.electron.recordRecipeHash(recipeToSave);
19+
} catch (error) {
20+
console.warn('Failed to mark saved workflow as trusted:', error);
21+
}
1622
return {
1723
id: response.data.id,
1824
fileName: response.data.file_name,

0 commit comments

Comments
 (0)