diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/DisableCache.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/DisableCache.tsx index c46f53f7..67067f99 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/DisableCache.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/DisableCache.tsx @@ -12,7 +12,7 @@ function DisableCache({ onCacheActionsChange, onDisableCacheChange, }: { - cacheActions: boolean; + cacheActions?: boolean; disableCache: boolean; editable: boolean; // -- diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/Taskv2Node/Taskv2Node.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/Taskv2Node/Taskv2Node.tsx index 79b62355..0238ad64 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/Taskv2Node/Taskv2Node.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/Taskv2Node/Taskv2Node.tsx @@ -26,6 +26,8 @@ import { useRerender } from "@/hooks/useRerender"; import { BlockCodeEditor } from "@/routes/workflows/components/BlockCodeEditor"; import { useBlockScriptStore } from "@/store/BlockScriptStore"; +import { DisableCache } from "../DisableCache"; + function Taskv2Node({ id, data, type }: NodeProps) { const { editable, label } = data; const { blockLabel: urlBlockLabel } = useParams(); @@ -49,6 +51,7 @@ function Taskv2Node({ id, data, type }: NodeProps) { totpVerificationUrl: data.totpVerificationUrl, totpIdentifier: data.totpIdentifier, maxSteps: data.maxSteps, + disableCache: data.disableCache, model: data.model, }); @@ -167,6 +170,18 @@ function Taskv2Node({ id, data, type }: NodeProps) { }} /> + + { + handleChange("cacheActions", cacheActions); + }} + onDisableCacheChange={(disableCache) => { + handleChange("disableCache", disableCache); + }} + /> +
+ { + handleChange("cacheActions", cacheActions); + }} + onDisableCacheChange={(disableCache) => { + handleChange("disableCache", disableCache); + }} + /> diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/ValidationNode/types.ts b/skyvern-frontend/src/routes/workflows/editor/nodes/ValidationNode/types.ts index 13a41fba..d8ff2b93 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/ValidationNode/types.ts +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/ValidationNode/types.ts @@ -6,6 +6,7 @@ export type ValidationNodeData = NodeBaseData & { terminateCriterion: string; errorCodeMapping: string; parameterKeys: Array; + disableCache: boolean; }; export type ValidationNode = Node; @@ -19,6 +20,7 @@ export const validationNodeDefaultData: ValidationNodeData = { continueOnFailure: false, editable: true, parameterKeys: [], + disableCache: false, model: null, }; diff --git a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts index 8fd9f051..28a5ddd0 100644 --- a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts +++ b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts @@ -264,6 +264,7 @@ function convertToNode( prompt: block.prompt, url: block.url ?? "", maxSteps: block.max_steps, + disableCache: block.disable_cache ?? false, totpIdentifier: block.totp_identifier, totpVerificationUrl: block.totp_verification_url, maxScreenshotScrolls: null, @@ -281,6 +282,7 @@ function convertToNode( completeCriterion: block.complete_criterion ?? "", terminateCriterion: block.terminate_criterion ?? "", parameterKeys: block.parameters.map((p) => p.key), + disableCache: block.disable_cache ?? false, }, }; } diff --git a/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts b/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts index c9116204..0e692f37 100644 --- a/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts +++ b/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts @@ -318,6 +318,7 @@ export type Taskv2Block = WorkflowBlockBase & { totp_verification_url: string | null; totp_identifier: string | null; max_steps: number | null; + disable_cache: boolean; }; export type ForLoopBlock = WorkflowBlockBase & { @@ -391,6 +392,7 @@ export type ValidationBlock = WorkflowBlockBase & { terminate_criterion: string | null; error_code_mapping: Record | null; parameters: Array; + disable_cache?: boolean; }; export type ActionBlock = WorkflowBlockBase & {