From 1ffe1e7889c0343dbc7034f9d57fe718fd976b89 Mon Sep 17 00:00:00 2001 From: Jonathan Dobson Date: Wed, 15 Oct 2025 08:20:50 -0400 Subject: [PATCH] add Disable Cache toggle to blocks that currently support Cache Actions (there are 6 of em) (#3719) --- .../editor/nodes/ActionNode/ActionNode.tsx | 35 ++++----- .../editor/nodes/ActionNode/types.ts | 2 + .../workflows/editor/nodes/DisableCache.tsx | 74 +++++++++++++++++++ .../nodes/ExtractionNode/ExtractionNode.tsx | 35 ++++----- .../editor/nodes/ExtractionNode/types.ts | 2 + .../FileDownloadNode/FileDownloadNode.tsx | 32 ++++---- .../editor/nodes/FileDownloadNode/types.ts | 2 + .../editor/nodes/LoginNode/LoginNode.tsx | 32 ++++---- .../workflows/editor/nodes/LoginNode/types.ts | 2 + .../nodes/NavigationNode/NavigationNode.tsx | 32 ++++---- .../editor/nodes/NavigationNode/types.ts | 2 + .../editor/nodes/TaskNode/TaskNode.tsx | 32 ++++---- .../workflows/editor/nodes/TaskNode/types.ts | 2 + .../workflows/editor/workflowEditorUtils.ts | 18 +++++ .../routes/workflows/types/workflowTypes.ts | 6 ++ .../workflows/types/workflowYamlTypes.ts | 6 ++ 16 files changed, 200 insertions(+), 114 deletions(-) create mode 100644 skyvern-frontend/src/routes/workflows/editor/nodes/DisableCache.tsx diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/ActionNode/ActionNode.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/ActionNode/ActionNode.tsx index 59b89bba..519b64ac 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/ActionNode/ActionNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/ActionNode/ActionNode.tsx @@ -41,6 +41,8 @@ import { NodeHeader } from "../components/NodeHeader"; import { statusIsRunningOrQueued } from "@/routes/tasks/types"; import { useWorkflowRunQuery } from "@/routes/workflows/hooks/useWorkflowRunQuery"; +import { DisableCache } from "../DisableCache"; + const urlTooltip = "The URL Skyvern is navigating to. Leave this field blank to pick up from where the last block left off."; const navigationGoalTooltip = @@ -61,6 +63,7 @@ function ActionNode({ id, data, type }: NodeProps) { allowDownloads: data.allowDownloads, continueOnFailure: data.continueOnFailure, cacheActions: data.cacheActions, + disableCache: data.disableCache, downloadSuffix: data.downloadSuffix, totpVerificationUrl: data.totpVerificationUrl, model: data.model, @@ -296,27 +299,17 @@ function ActionNode({ id, data, type }: NodeProps) { /> -
-
- - -
-
- { - if (!editable) { - return; - } - handleChange("cacheActions", checked); - }} - /> -
-
+ { + handleChange("cacheActions", cacheActions); + }} + onDisableCacheChange={(disableCache) => { + handleChange("disableCache", disableCache); + }} + />
diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/ActionNode/types.ts b/skyvern-frontend/src/routes/workflows/editor/nodes/ActionNode/types.ts index 1ce012f6..53e8bd38 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/ActionNode/types.ts +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/ActionNode/types.ts @@ -14,6 +14,7 @@ export type ActionNodeData = NodeBaseData & { totpVerificationUrl: string | null; totpIdentifier: string | null; cacheActions: boolean; + disableCache: boolean; engine: RunEngine | null; }; @@ -34,6 +35,7 @@ export const actionNodeDefaultData: ActionNodeData = { totpIdentifier: null, continueOnFailure: false, cacheActions: false, + disableCache: false, engine: RunEngine.SkyvernV1, model: null, } as const; diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/DisableCache.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/DisableCache.tsx new file mode 100644 index 00000000..c46f53f7 --- /dev/null +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/DisableCache.tsx @@ -0,0 +1,74 @@ +import { HelpTooltip } from "@/components/HelpTooltip"; +import { Label } from "@/components/ui/label"; +import { Switch } from "@/components/ui/switch"; + +import { helpTooltips } from "../helpContent"; + +function DisableCache({ + cacheActions, + disableCache, + editable, + // -- + onCacheActionsChange, + onDisableCacheChange, +}: { + cacheActions: boolean; + disableCache: boolean; + editable: boolean; + // -- + onCacheActionsChange: (cacheActions: boolean) => void; + onDisableCacheChange: (disableCache: boolean) => void; +}) { + return ( + <> + {/* NOTE: Cache Actions is deprecated, and will be removed + + It has been explicitly requested to only show this when 'cache actions' is `true` + for the block. If it's `false`, we are not showing it. + + */} + {cacheActions && ( +
+
+ + +
+
+ { + if (!editable) { + return; + } + onCacheActionsChange(checked); + }} + /> +
+
+ )} +
+
+ + +
+
+ { + if (!editable) { + return; + } + onDisableCacheChange(checked); + }} + /> +
+
+ + ); +} + +export { DisableCache }; diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/ExtractionNode/ExtractionNode.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/ExtractionNode/ExtractionNode.tsx index e52b2811..f7184d00 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/ExtractionNode/ExtractionNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/ExtractionNode/ExtractionNode.tsx @@ -42,6 +42,8 @@ import { statusIsRunningOrQueued } from "@/routes/tasks/types"; import { useWorkflowRunQuery } from "@/routes/workflows/hooks/useWorkflowRunQuery"; import { useRerender } from "@/hooks/useRerender"; +import { DisableCache } from "../DisableCache"; + function ExtractionNode({ id, data, type }: NodeProps) { const { updateNodeData } = useReactFlow(); const [facing, setFacing] = useState<"front" | "back">("front"); @@ -63,6 +65,7 @@ function ExtractionNode({ id, data, type }: NodeProps) { maxStepsOverride: data.maxStepsOverride, continueOnFailure: data.continueOnFailure, cacheActions: data.cacheActions, + disableCache: data.disableCache, engine: data.engine, model: data.model, }); @@ -254,27 +257,17 @@ function ExtractionNode({ id, data, type }: NodeProps) { />
-
-
- - -
-
- { - if (!editable) { - return; - } - handleChange("cacheActions", checked); - }} - /> -
-
+ { + handleChange("cacheActions", cacheActions); + }} + onDisableCacheChange={(disableCache) => { + handleChange("disableCache", disableCache); + }} + /> diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/ExtractionNode/types.ts b/skyvern-frontend/src/routes/workflows/editor/nodes/ExtractionNode/types.ts index 2045bf50..2978c6f3 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/ExtractionNode/types.ts +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/ExtractionNode/types.ts @@ -11,6 +11,7 @@ export type ExtractionNodeData = NodeBaseData & { maxStepsOverride: number | null; parameterKeys: Array; cacheActions: boolean; + disableCache: boolean; engine: RunEngine | null; }; @@ -28,6 +29,7 @@ export const extractionNodeDefaultData: ExtractionNodeData = { parameterKeys: [], continueOnFailure: false, cacheActions: false, + disableCache: false, engine: RunEngine.SkyvernV1, model: null, } as const; diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/FileDownloadNode/FileDownloadNode.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/FileDownloadNode/FileDownloadNode.tsx index c7370c1b..243e973c 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/FileDownloadNode/FileDownloadNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/FileDownloadNode/FileDownloadNode.tsx @@ -42,6 +42,8 @@ import { useWorkflowRunQuery } from "@/routes/workflows/hooks/useWorkflowRunQuer import { useRerender } from "@/hooks/useRerender"; import { BROWSER_DOWNLOAD_TIMEOUT_SECONDS } from "@/api/types"; +import { DisableCache } from "../DisableCache"; + const urlTooltip = "The URL Skyvern is navigating to. Leave this field blank to pick up from where the last block left off."; const urlPlaceholder = "https://"; @@ -70,6 +72,7 @@ function FileDownloadNode({ id, data }: NodeProps) { maxStepsOverride: data.maxStepsOverride, continueOnFailure: data.continueOnFailure, cacheActions: data.cacheActions, + disableCache: data.disableCache, downloadSuffix: data.downloadSuffix, totpVerificationUrl: data.totpVerificationUrl, totpIdentifier: data.totpIdentifier, @@ -323,24 +326,17 @@ function FileDownloadNode({ id, data }: NodeProps) { /> -
-
- - -
-
- { - handleChange("cacheActions", checked); - }} - /> -
-
+ { + handleChange("cacheActions", cacheActions); + }} + onDisableCacheChange={(disableCache) => { + handleChange("disableCache", disableCache); + }} + />
diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/FileDownloadNode/types.ts b/skyvern-frontend/src/routes/workflows/editor/nodes/FileDownloadNode/types.ts index 9f04e975..60909495 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/FileDownloadNode/types.ts +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/FileDownloadNode/types.ts @@ -15,6 +15,7 @@ export type FileDownloadNodeData = NodeBaseData & { totpIdentifier: string | null; engine: RunEngine | null; cacheActions: boolean; + disableCache: boolean; downloadTimeout: number | null; }; @@ -35,6 +36,7 @@ export const fileDownloadNodeDefaultData: FileDownloadNodeData = { totpIdentifier: null, continueOnFailure: false, cacheActions: false, + disableCache: false, engine: RunEngine.SkyvernV1, model: null, downloadTimeout: null, diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/LoginNode.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/LoginNode.tsx index b731c905..7abaa295 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/LoginNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/LoginNode.tsx @@ -42,6 +42,8 @@ import { statusIsRunningOrQueued } from "@/routes/tasks/types"; import { useWorkflowRunQuery } from "@/routes/workflows/hooks/useWorkflowRunQuery"; import { useRerender } from "@/hooks/useRerender"; +import { DisableCache } from "../DisableCache"; + function LoginNode({ id, data, type }: NodeProps) { const { updateNodeData } = useReactFlow(); const [facing, setFacing] = useState<"front" | "back">("front"); @@ -63,6 +65,7 @@ function LoginNode({ id, data, type }: NodeProps) { maxStepsOverride: data.maxStepsOverride, continueOnFailure: data.continueOnFailure, cacheActions: data.cacheActions, + disableCache: data.disableCache, totpVerificationUrl: data.totpVerificationUrl, totpIdentifier: data.totpIdentifier, completeCriterion: data.completeCriterion, @@ -323,24 +326,17 @@ function LoginNode({ id, data, type }: NodeProps) { />
-
-
- - -
-
- { - handleChange("cacheActions", checked); - }} - /> -
-
+ { + handleChange("cacheActions", cacheActions); + }} + onDisableCacheChange={(disableCache) => { + handleChange("disableCache", disableCache); + }} + />
diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/types.ts b/skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/types.ts index 8ea5a61f..8ff7f64d 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/types.ts +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/types.ts @@ -13,6 +13,7 @@ export type LoginNodeData = NodeBaseData & { totpVerificationUrl: string | null; totpIdentifier: string | null; cacheActions: boolean; + disableCache: boolean; completeCriterion: string; terminateCriterion: string; engine: RunEngine | null; @@ -35,6 +36,7 @@ export const loginNodeDefaultData: LoginNodeData = { totpIdentifier: null, continueOnFailure: false, cacheActions: false, + disableCache: false, completeCriterion: "", terminateCriterion: "", engine: RunEngine.SkyvernV1, diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/NavigationNode/NavigationNode.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/NavigationNode/NavigationNode.tsx index f3210423..091fe8db 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/NavigationNode/NavigationNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/NavigationNode/NavigationNode.tsx @@ -42,6 +42,8 @@ import { NodeHeader } from "../components/NodeHeader"; import { statusIsRunningOrQueued } from "@/routes/tasks/types"; import { useWorkflowRunQuery } from "@/routes/workflows/hooks/useWorkflowRunQuery"; +import { DisableCache } from "../DisableCache"; + function NavigationNode({ id, data, type }: NodeProps) { const { blockLabel: urlBlockLabel } = useParams(); const { updateNodeData } = useReactFlow(); @@ -60,6 +62,7 @@ function NavigationNode({ id, data, type }: NodeProps) { const [inputs, setInputs] = useState({ allowDownloads: data.allowDownloads, cacheActions: data.cacheActions, + disableCache: data.disableCache, completeCriterion: data.completeCriterion, continueOnFailure: data.continueOnFailure, downloadSuffix: data.downloadSuffix, @@ -360,24 +363,17 @@ function NavigationNode({ id, data, type }: NodeProps) { />
-
-
- - -
-
- { - handleChange("cacheActions", checked); - }} - /> -
-
+ { + handleChange("cacheActions", cacheActions); + }} + onDisableCacheChange={(disableCache) => { + handleChange("disableCache", disableCache); + }} + />
diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/NavigationNode/types.ts b/skyvern-frontend/src/routes/workflows/editor/nodes/NavigationNode/types.ts index 187e8204..173f671a 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/NavigationNode/types.ts +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/NavigationNode/types.ts @@ -18,6 +18,7 @@ export type NavigationNodeData = NodeBaseData & { totpVerificationUrl: string | null; totpIdentifier: string | null; cacheActions: boolean; + disableCache: boolean; includeActionHistoryInVerification: boolean; }; @@ -43,6 +44,7 @@ export const navigationNodeDefaultData: NavigationNodeData = { totpIdentifier: null, continueOnFailure: false, cacheActions: false, + disableCache: false, includeActionHistoryInVerification: false, } as const; diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/TaskNode/TaskNode.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/TaskNode/TaskNode.tsx index 1749958a..2512155c 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/TaskNode/TaskNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/TaskNode/TaskNode.tsx @@ -43,6 +43,8 @@ import { statusIsRunningOrQueued } from "@/routes/tasks/types"; import { useWorkflowRunQuery } from "@/routes/workflows/hooks/useWorkflowRunQuery"; import { useRerender } from "@/hooks/useRerender"; +import { DisableCache } from "../DisableCache"; + function TaskNode({ id, data, type }: NodeProps) { const { updateNodeData } = useReactFlow(); const [facing, setFacing] = useState<"front" | "back">("front"); @@ -75,6 +77,7 @@ function TaskNode({ id, data, type }: NodeProps) { allowDownloads: data.allowDownloads, continueOnFailure: data.continueOnFailure, cacheActions: data.cacheActions, + disableCache: data.disableCache, downloadSuffix: data.downloadSuffix, errorCodeMapping: data.errorCodeMapping, totpVerificationUrl: data.totpVerificationUrl, @@ -377,24 +380,17 @@ function TaskNode({ id, data, type }: NodeProps) { />
-
-
- - -
-
- { - handleChange("cacheActions", checked); - }} - /> -
-
+ { + handleChange("cacheActions", cacheActions); + }} + onDisableCacheChange={(disableCache) => { + handleChange("disableCache", disableCache); + }} + />
diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/TaskNode/types.ts b/skyvern-frontend/src/routes/workflows/editor/nodes/TaskNode/types.ts index 3da6ef34..891b5e2d 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/TaskNode/types.ts +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/TaskNode/types.ts @@ -18,6 +18,7 @@ export type TaskNodeData = NodeBaseData & { totpVerificationUrl: string | null; totpIdentifier: string | null; cacheActions: boolean; + disableCache: boolean; includeActionHistoryInVerification: boolean; engine: RunEngine | null; }; @@ -44,6 +45,7 @@ export const taskNodeDefaultData: TaskNodeData = { totpIdentifier: null, continueOnFailure: false, cacheActions: false, + disableCache: false, includeActionHistoryInVerification: false, engine: RunEngine.SkyvernV1, model: null, diff --git a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts index c1967aed..8fd9f051 100644 --- a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts +++ b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts @@ -245,6 +245,7 @@ function convertToNode( totpIdentifier: block.totp_identifier ?? null, totpVerificationUrl: block.totp_verification_url ?? null, cacheActions: block.cache_actions, + disableCache: block.disable_cache ?? false, completeCriterion: block.complete_criterion ?? "", terminateCriterion: block.terminate_criterion ?? "", includeActionHistoryInVerification: @@ -300,6 +301,7 @@ function convertToNode( totpIdentifier: block.totp_identifier ?? null, totpVerificationUrl: block.totp_verification_url ?? null, cacheActions: block.cache_actions, + disableCache: block.disable_cache ?? false, engine: block.engine ?? RunEngine.SkyvernV1, }, }; @@ -321,6 +323,7 @@ function convertToNode( totpIdentifier: block.totp_identifier ?? null, totpVerificationUrl: block.totp_verification_url ?? null, cacheActions: block.cache_actions, + disableCache: block.disable_cache ?? false, maxStepsOverride: block.max_steps_per_run ?? null, completeCriterion: block.complete_criterion ?? "", terminateCriterion: block.terminate_criterion ?? "", @@ -347,6 +350,7 @@ function convertToNode( maxRetries: block.max_retries ?? null, maxStepsOverride: block.max_steps_per_run ?? null, cacheActions: block.cache_actions, + disableCache: block.disable_cache ?? false, engine: block.engine ?? RunEngine.SkyvernV1, }, }; @@ -366,6 +370,7 @@ function convertToNode( totpIdentifier: block.totp_identifier ?? null, totpVerificationUrl: block.totp_verification_url ?? null, cacheActions: block.cache_actions, + disableCache: block.disable_cache ?? false, maxStepsOverride: block.max_steps_per_run ?? null, completeCriterion: block.complete_criterion ?? "", terminateCriterion: block.terminate_criterion ?? "", @@ -400,6 +405,7 @@ function convertToNode( totpIdentifier: block.totp_identifier ?? null, totpVerificationUrl: block.totp_verification_url ?? null, cacheActions: block.cache_actions, + disableCache: block.disable_cache ?? false, maxStepsOverride: block.max_steps_per_run ?? null, engine: block.engine ?? RunEngine.SkyvernV1, downloadTimeout: block.download_timeout ?? null, // seconds @@ -1065,6 +1071,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML { totp_identifier: node.data.totpIdentifier, totp_verification_url: node.data.totpVerificationUrl, cache_actions: node.data.cacheActions, + disable_cache: node.data.disableCache ?? false, include_action_history_in_verification: node.data.includeActionHistoryInVerification, engine: node.data.engine, @@ -1114,6 +1121,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML { totp_identifier: node.data.totpIdentifier, totp_verification_url: node.data.totpVerificationUrl, cache_actions: node.data.cacheActions, + disable_cache: node.data.disableCache ?? false, engine: node.data.engine, }; } @@ -1138,6 +1146,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML { totp_identifier: node.data.totpIdentifier, totp_verification_url: node.data.totpVerificationUrl, cache_actions: node.data.cacheActions, + disable_cache: node.data.disableCache ?? false, complete_criterion: node.data.completeCriterion, terminate_criterion: node.data.terminateCriterion, engine: node.data.engine, @@ -1159,6 +1168,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML { max_steps_per_run: node.data.maxStepsOverride, parameter_keys: node.data.parameterKeys, cache_actions: node.data.cacheActions, + disable_cache: node.data.disableCache ?? false, engine: node.data.engine, }; } @@ -1181,6 +1191,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML { totp_identifier: node.data.totpIdentifier, totp_verification_url: node.data.totpVerificationUrl, cache_actions: node.data.cacheActions, + disable_cache: node.data.disableCache ?? false, complete_criterion: node.data.completeCriterion, terminate_criterion: node.data.terminateCriterion, engine: node.data.engine, @@ -1213,6 +1224,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML { totp_identifier: node.data.totpIdentifier, totp_verification_url: node.data.totpVerificationUrl, cache_actions: node.data.cacheActions, + disable_cache: node.data.disableCache ?? false, engine: node.data.engine, download_timeout: node.data.downloadTimeout, // seconds }; @@ -1860,6 +1872,7 @@ function convertBlocksToBlockYAML( totp_identifier: block.totp_identifier, totp_verification_url: block.totp_verification_url, cache_actions: block.cache_actions, + disable_cache: block.disable_cache ?? false, include_action_history_in_verification: block.include_action_history_in_verification, engine: block.engine, @@ -1904,6 +1917,7 @@ function convertBlocksToBlockYAML( totp_identifier: block.totp_identifier, totp_verification_url: block.totp_verification_url, cache_actions: block.cache_actions, + disable_cache: block.disable_cache ?? false, engine: block.engine, }; return blockYaml; @@ -1926,6 +1940,7 @@ function convertBlocksToBlockYAML( totp_identifier: block.totp_identifier, totp_verification_url: block.totp_verification_url, cache_actions: block.cache_actions, + disable_cache: block.disable_cache ?? false, complete_criterion: block.complete_criterion, terminate_criterion: block.terminate_criterion, include_action_history_in_verification: @@ -1945,6 +1960,7 @@ function convertBlocksToBlockYAML( max_steps_per_run: block.max_steps_per_run, parameter_keys: block.parameters.map((p) => p.key), cache_actions: block.cache_actions, + disable_cache: block.disable_cache ?? false, engine: block.engine, }; return blockYaml; @@ -1963,6 +1979,7 @@ function convertBlocksToBlockYAML( totp_identifier: block.totp_identifier, totp_verification_url: block.totp_verification_url, cache_actions: block.cache_actions, + disable_cache: block.disable_cache ?? false, complete_criterion: block.complete_criterion, terminate_criterion: block.terminate_criterion, engine: block.engine, @@ -1992,6 +2009,7 @@ function convertBlocksToBlockYAML( totp_identifier: block.totp_identifier, totp_verification_url: block.totp_verification_url, cache_actions: block.cache_actions, + disable_cache: block.disable_cache ?? false, engine: block.engine, download_timeout: null, // seconds }; diff --git a/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts b/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts index f1c79b3c..c9116204 100644 --- a/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts +++ b/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts @@ -306,6 +306,7 @@ export type TaskBlock = WorkflowBlockBase & { totp_verification_url?: string | null; totp_identifier?: string | null; cache_actions: boolean; + disable_cache?: boolean; include_action_history_in_verification: boolean; engine: RunEngine | null; }; @@ -406,6 +407,7 @@ export type ActionBlock = WorkflowBlockBase & { totp_verification_url?: string | null; totp_identifier?: string | null; cache_actions: boolean; + disable_cache?: boolean; engine: RunEngine | null; }; @@ -423,6 +425,7 @@ export type NavigationBlock = WorkflowBlockBase & { totp_verification_url?: string | null; totp_identifier?: string | null; cache_actions: boolean; + disable_cache?: boolean; complete_criterion: string | null; terminate_criterion: string | null; engine: RunEngine | null; @@ -439,6 +442,7 @@ export type ExtractionBlock = WorkflowBlockBase & { max_steps_per_run?: number | null; parameters: Array; cache_actions: boolean; + disable_cache?: boolean; engine: RunEngine | null; }; @@ -454,6 +458,7 @@ export type LoginBlock = WorkflowBlockBase & { totp_verification_url?: string | null; totp_identifier?: string | null; cache_actions: boolean; + disable_cache?: boolean; complete_criterion: string | null; terminate_criterion: string | null; engine: RunEngine | null; @@ -477,6 +482,7 @@ export type FileDownloadBlock = WorkflowBlockBase & { totp_verification_url?: string | null; totp_identifier?: string | null; cache_actions: boolean; + disable_cache?: boolean; engine: RunEngine | null; download_timeout: number | null; // seconds }; diff --git a/skyvern-frontend/src/routes/workflows/types/workflowYamlTypes.ts b/skyvern-frontend/src/routes/workflows/types/workflowYamlTypes.ts index 1b0180ee..c44fdaba 100644 --- a/skyvern-frontend/src/routes/workflows/types/workflowYamlTypes.ts +++ b/skyvern-frontend/src/routes/workflows/types/workflowYamlTypes.ts @@ -160,6 +160,7 @@ export type TaskBlockYAML = BlockYAMLBase & { totp_verification_url?: string | null; totp_identifier?: string | null; cache_actions: boolean; + disable_cache: boolean; complete_criterion: string | null; terminate_criterion: string | null; include_action_history_in_verification: boolean; @@ -196,6 +197,7 @@ export type ActionBlockYAML = BlockYAMLBase & { totp_verification_url?: string | null; totp_identifier?: string | null; cache_actions: boolean; + disable_cache: boolean; engine: RunEngine | null; }; @@ -213,6 +215,7 @@ export type NavigationBlockYAML = BlockYAMLBase & { totp_verification_url?: string | null; totp_identifier?: string | null; cache_actions: boolean; + disable_cache: boolean; complete_criterion: string | null; terminate_criterion: string | null; engine: RunEngine | null; @@ -230,6 +233,7 @@ export type ExtractionBlockYAML = BlockYAMLBase & { max_steps_per_run?: number | null; parameter_keys?: Array | null; cache_actions: boolean; + disable_cache: boolean; engine: RunEngine | null; }; @@ -245,6 +249,7 @@ export type LoginBlockYAML = BlockYAMLBase & { totp_verification_url?: string | null; totp_identifier?: string | null; cache_actions: boolean; + disable_cache: boolean; complete_criterion: string | null; terminate_criterion: string | null; engine: RunEngine | null; @@ -268,6 +273,7 @@ export type FileDownloadBlockYAML = BlockYAMLBase & { totp_verification_url?: string | null; totp_identifier?: string | null; cache_actions: boolean; + disable_cache: boolean; engine: RunEngine | null; download_timeout?: number | null; };