Revert "Remove code generation deletion confirmation prompt" (#4639)

Co-authored-by: Suchintan Singh <suchintan@skyvern.com>
This commit is contained in:
Suchintan
2026-02-05 07:40:44 -05:00
committed by GitHub
parent 54c795bf1b
commit a664ef50d5
5 changed files with 138 additions and 3 deletions

View File

@@ -356,6 +356,8 @@ function Workspace({
await saveWorkflow.mutateAsync();
workflowChangesStore.setSaidOkToCodeCacheDeletion(false);
queryClient.invalidateQueries({
queryKey: ["cache-key-values", workflowPermanentId, cacheKey],
});
@@ -1111,6 +1113,40 @@ function Workspace({
</DialogContent>
</Dialog>
{/* confirm code cache deletion dialog */}
<Dialog
open={workflowChangesStore.showConfirmCodeCacheDeletion}
onOpenChange={(open) => {
!open && workflowChangesStore.setShowConfirmCodeCacheDeletion(false);
!open && workflowChangesStore.setSaidOkToCodeCacheDeletion(false);
}}
>
<DialogContent>
<DialogHeader>
<DialogTitle>Are you sure?</DialogTitle>
<DialogDescription>
Saving will delete cached code, and Skyvern will re-generate it in
the next run. Proceed?
</DialogDescription>
</DialogHeader>
<DialogFooter>
<DialogClose asChild>
<Button variant="secondary">Cancel</Button>
</DialogClose>
<Button
variant="default"
onClick={async () => {
workflowChangesStore.setSaidOkToCodeCacheDeletion(true);
await handleOnSave();
workflowChangesStore.setShowConfirmCodeCacheDeletion(false);
}}
>
Yes
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
{/* cache key value delete dialog */}
<Dialog
open={openConfirmCacheKeyValueDeleteDialogue}