remove cache actions (#4015)

This commit is contained in:
Shuchang Zheng
2025-11-17 21:06:51 -08:00
committed by GitHub
parent 34eb5bb85b
commit d118eb5d4e
26 changed files with 2 additions and 141 deletions

View File

@@ -23,7 +23,6 @@ export const baseHelpTooltipContent = {
"If you are running multiple workflows at once, you will need to give the block an identifier to know that this TOTP goes with this block.",
continueOnFailure:
"Allow the workflow to continue if it encounters a failure.",
cacheActions: "Cache the actions of this block.",
includeActionHistoryInVerification:
"Include the action history in the completion verification.",
} as const;

View File

@@ -269,12 +269,8 @@ function ActionNode({ id, data, type }: NodeProps<ActionNode>) {
</div>
</div>
<DisableCache
cacheActions={data.cacheActions}
disableCache={data.disableCache}
editable={editable}
onCacheActionsChange={(cacheActions) => {
update({ cacheActions });
}}
onDisableCacheChange={(disableCache) => {
update({ disableCache });
}}

View File

@@ -13,7 +13,6 @@ export type ActionNodeData = NodeBaseData & {
parameterKeys: Array<string>;
totpVerificationUrl: string | null;
totpIdentifier: string | null;
cacheActions: boolean;
disableCache: boolean;
engine: RunEngine | null;
};
@@ -34,7 +33,6 @@ export const actionNodeDefaultData: ActionNodeData = {
totpVerificationUrl: null,
totpIdentifier: null,
continueOnFailure: false,
cacheActions: false,
disableCache: false,
engine: RunEngine.SkyvernV1,
model: null,

View File

@@ -2,21 +2,15 @@ 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 (
@@ -27,27 +21,6 @@ function DisableCache({
for the block. If it's `false`, we are not showing it.
*/}
{cacheActions && (
<div className="flex items-center justify-between">
<div className="flex gap-2">
<Label className="text-xs font-normal text-slate-300">
Cache Actions
</Label>
<HelpTooltip content={helpTooltips["extraction"]["cacheActions"]} />
</div>
<div className="w-52">
<Switch
checked={cacheActions}
onCheckedChange={(checked) => {
if (!editable) {
return;
}
onCacheActionsChange(checked);
}}
/>
</div>
</div>
)}
<div className="flex items-center justify-between">
<div className="flex gap-2">
<Label className="text-xs font-normal text-slate-300">

View File

@@ -232,12 +232,8 @@ function ExtractionNode({ id, data, type }: NodeProps<ExtractionNode>) {
</div>
</div>
<DisableCache
cacheActions={data.cacheActions}
disableCache={data.disableCache}
editable={editable}
onCacheActionsChange={(cacheActions) => {
update({ cacheActions });
}}
onDisableCacheChange={(disableCache) => {
update({ disableCache });
}}

View File

@@ -10,7 +10,6 @@ export type ExtractionNodeData = NodeBaseData & {
maxRetries: number | null;
maxStepsOverride: number | null;
parameterKeys: Array<string>;
cacheActions: boolean;
disableCache: boolean;
engine: RunEngine | null;
};
@@ -28,7 +27,6 @@ export const extractionNodeDefaultData: ExtractionNodeData = {
editable: true,
parameterKeys: [],
continueOnFailure: false,
cacheActions: false,
disableCache: false,
engine: RunEngine.SkyvernV1,
model: null,

View File

@@ -297,12 +297,8 @@ function FileDownloadNode({ id, data }: NodeProps<FileDownloadNode>) {
</div>
</div>
<DisableCache
cacheActions={data.cacheActions}
disableCache={data.disableCache}
editable={editable}
onCacheActionsChange={(cacheActions) => {
update({ cacheActions });
}}
onDisableCacheChange={(disableCache) => {
update({ disableCache });
}}

View File

@@ -14,7 +14,6 @@ export type FileDownloadNodeData = NodeBaseData & {
totpVerificationUrl: string | null;
totpIdentifier: string | null;
engine: RunEngine | null;
cacheActions: boolean;
disableCache: boolean;
downloadTimeout: number | null;
};
@@ -35,7 +34,6 @@ export const fileDownloadNodeDefaultData: FileDownloadNodeData = {
totpVerificationUrl: null,
totpIdentifier: null,
continueOnFailure: false,
cacheActions: false,
disableCache: false,
engine: RunEngine.SkyvernV1,
model: null,

View File

@@ -294,12 +294,8 @@ function LoginNode({ id, data, type }: NodeProps<LoginNode>) {
</div>
</div>
<DisableCache
cacheActions={data.cacheActions}
disableCache={data.disableCache}
editable={editable}
onCacheActionsChange={(cacheActions) => {
update({ cacheActions });
}}
onDisableCacheChange={(disableCache) => {
update({ disableCache });
}}

View File

@@ -12,7 +12,6 @@ export type LoginNodeData = NodeBaseData & {
parameterKeys: Array<string>;
totpVerificationUrl: string | null;
totpIdentifier: string | null;
cacheActions: boolean;
disableCache: boolean;
completeCriterion: string;
terminateCriterion: string;
@@ -35,7 +34,6 @@ export const loginNodeDefaultData: LoginNodeData = {
totpVerificationUrl: null,
totpIdentifier: null,
continueOnFailure: false,
cacheActions: false,
disableCache: false,
completeCriterion: "",
terminateCriterion: "",

View File

@@ -328,12 +328,8 @@ function NavigationNode({ id, data, type }: NodeProps<NavigationNode>) {
</div>
</div>
<DisableCache
cacheActions={data.cacheActions}
disableCache={data.disableCache}
editable={editable}
onCacheActionsChange={(cacheActions) => {
update({ cacheActions });
}}
onDisableCacheChange={(disableCache) => {
update({ disableCache });
}}

View File

@@ -17,7 +17,6 @@ export type NavigationNodeData = NodeBaseData & {
parameterKeys: Array<string>;
totpVerificationUrl: string | null;
totpIdentifier: string | null;
cacheActions: boolean;
disableCache: boolean;
includeActionHistoryInVerification: boolean;
};
@@ -43,7 +42,6 @@ export const navigationNodeDefaultData: NavigationNodeData = {
totpVerificationUrl: null,
totpIdentifier: null,
continueOnFailure: false,
cacheActions: false,
disableCache: false,
includeActionHistoryInVerification: false,
} as const;

View File

@@ -343,12 +343,8 @@ function TaskNode({ id, data, type }: NodeProps<TaskNode>) {
</div>
</div>
<DisableCache
cacheActions={data.cacheActions}
disableCache={data.disableCache}
editable={editable}
onCacheActionsChange={(cacheActions) => {
update({ cacheActions });
}}
onDisableCacheChange={(disableCache) => {
update({ disableCache });
}}

View File

@@ -17,7 +17,6 @@ export type TaskNodeData = NodeBaseData & {
parameterKeys: Array<string>;
totpVerificationUrl: string | null;
totpIdentifier: string | null;
cacheActions: boolean;
disableCache: boolean;
includeActionHistoryInVerification: boolean;
engine: RunEngine | null;
@@ -44,7 +43,6 @@ export const taskNodeDefaultData: TaskNodeData = {
totpVerificationUrl: null,
totpIdentifier: null,
continueOnFailure: false,
cacheActions: false,
disableCache: false,
includeActionHistoryInVerification: false,
engine: RunEngine.SkyvernV1,

View File

@@ -160,9 +160,6 @@ function Taskv2Node({ id, data, type }: NodeProps<Taskv2Node>) {
<DisableCache
disableCache={data.disableCache}
editable={editable}
onCacheActionsChange={(cacheActions) => {
update({ cacheActions });
}}
onDisableCacheChange={(disableCache) => {
update({ disableCache });
}}

View File

@@ -11,7 +11,6 @@ export type Taskv2NodeData = NodeBaseData & {
totpVerificationUrl: string | null;
totpIdentifier: string | null;
maxSteps: number | null;
cacheActions: boolean;
disableCache: boolean;
maxScreenshotScrolls: number | null;
};
@@ -28,7 +27,6 @@ export const taskv2NodeDefaultData: Taskv2NodeData = {
totpIdentifier: null,
totpVerificationUrl: null,
maxSteps: MAX_STEPS_DEFAULT,
cacheActions: false,
disableCache: false,
model: null,
maxScreenshotScrolls: null,

View File

@@ -236,9 +236,6 @@ function ValidationNode({ id, data, type }: NodeProps<ValidationNode>) {
<DisableCache
disableCache={data.disableCache}
editable={editable}
onCacheActionsChange={(cacheActions) => {
update({ cacheActions });
}}
onDisableCacheChange={(disableCache) => {
update({ disableCache });
}}

View File

@@ -6,7 +6,6 @@ export type ValidationNodeData = NodeBaseData & {
terminateCriterion: string;
errorCodeMapping: string;
parameterKeys: Array<string>;
cacheActions?: boolean;
disableCache: boolean;
};
@@ -21,7 +20,6 @@ export const validationNodeDefaultData: ValidationNodeData = {
continueOnFailure: false,
editable: true,
parameterKeys: [],
cacheActions: false,
disableCache: false,
model: null,
};

View File

@@ -249,7 +249,6 @@ function convertToNode(
parameterKeys: block.parameters.map((p) => p.key),
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 ?? "",
@@ -269,7 +268,6 @@ function convertToNode(
prompt: block.prompt,
url: block.url ?? "",
maxSteps: block.max_steps,
cacheActions: block.cache_actions ?? false,
disableCache: block.disable_cache ?? false,
totpIdentifier: block.totp_identifier,
totpVerificationUrl: block.totp_verification_url,
@@ -308,7 +306,6 @@ function convertToNode(
parameterKeys: block.parameters.map((p) => p.key),
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,
},
@@ -330,7 +327,6 @@ function convertToNode(
parameterKeys: block.parameters.map((p) => p.key),
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 ?? "",
@@ -375,7 +371,6 @@ function convertToNode(
parameterKeys: block.parameters.map((p) => p.key),
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,
},
@@ -395,7 +390,6 @@ function convertToNode(
parameterKeys: block.parameters.map((p) => p.key),
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 ?? "",
@@ -430,7 +424,6 @@ function convertToNode(
parameterKeys: block.parameters.map((p) => p.key),
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,
@@ -1107,7 +1100,6 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
parameter_keys: node.data.parameterKeys,
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,
@@ -1174,7 +1166,6 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
parameter_keys: node.data.parameterKeys,
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,
};
@@ -1199,7 +1190,6 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
parameter_keys: node.data.parameterKeys,
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,
@@ -1221,7 +1211,6 @@ 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,
};
@@ -1244,7 +1233,6 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
parameter_keys: node.data.parameterKeys,
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,
@@ -1277,7 +1265,6 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
parameter_keys: node.data.parameterKeys,
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
@@ -1930,7 +1917,6 @@ function convertBlocksToBlockYAML(
parameter_keys: block.parameters.map((p) => p.key),
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,
@@ -1993,7 +1979,6 @@ function convertBlocksToBlockYAML(
parameter_keys: block.parameters.map((p) => p.key),
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,
};
@@ -2016,7 +2001,6 @@ function convertBlocksToBlockYAML(
parameter_keys: block.parameters.map((p) => p.key),
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,
@@ -2036,7 +2020,6 @@ function convertBlocksToBlockYAML(
max_retries: block.max_retries,
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,
};
@@ -2055,7 +2038,6 @@ function convertBlocksToBlockYAML(
parameter_keys: block.parameters.map((p) => p.key),
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,
@@ -2085,7 +2067,6 @@ function convertBlocksToBlockYAML(
parameter_keys: block.parameters.map((p) => p.key),
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

View File

@@ -307,7 +307,6 @@ export type TaskBlock = WorkflowBlockBase & {
download_suffix?: string | null;
totp_verification_url?: string | null;
totp_identifier?: string | null;
cache_actions: boolean;
disable_cache?: boolean;
include_action_history_in_verification: boolean;
engine: RunEngine | null;
@@ -320,7 +319,6 @@ export type Taskv2Block = WorkflowBlockBase & {
totp_verification_url: string | null;
totp_identifier: string | null;
max_steps: number | null;
cache_actions?: boolean;
disable_cache: boolean;
};
@@ -425,7 +423,6 @@ export type ActionBlock = WorkflowBlockBase & {
download_suffix?: string | null;
totp_verification_url?: string | null;
totp_identifier?: string | null;
cache_actions: boolean;
disable_cache?: boolean;
engine: RunEngine | null;
};
@@ -443,7 +440,6 @@ export type NavigationBlock = WorkflowBlockBase & {
download_suffix?: string | null;
totp_verification_url?: string | null;
totp_identifier?: string | null;
cache_actions: boolean;
disable_cache?: boolean;
complete_criterion: string | null;
terminate_criterion: string | null;
@@ -460,7 +456,6 @@ export type ExtractionBlock = WorkflowBlockBase & {
max_retries?: number;
max_steps_per_run?: number | null;
parameters: Array<WorkflowParameter>;
cache_actions: boolean;
disable_cache?: boolean;
engine: RunEngine | null;
};
@@ -476,7 +471,6 @@ export type LoginBlock = WorkflowBlockBase & {
parameters: Array<WorkflowParameter>;
totp_verification_url?: string | null;
totp_identifier?: string | null;
cache_actions: boolean;
disable_cache?: boolean;
complete_criterion: string | null;
terminate_criterion: string | null;
@@ -500,7 +494,6 @@ export type FileDownloadBlock = WorkflowBlockBase & {
parameters: Array<WorkflowParameter>;
totp_verification_url?: string | null;
totp_identifier?: string | null;
cache_actions: boolean;
disable_cache?: boolean;
engine: RunEngine | null;
download_timeout: number | null; // seconds

View File

@@ -161,7 +161,6 @@ export type TaskBlockYAML = BlockYAMLBase & {
download_suffix?: string | null;
totp_verification_url?: string | null;
totp_identifier?: string | null;
cache_actions: boolean;
disable_cache: boolean;
complete_criterion: string | null;
terminate_criterion: string | null;
@@ -213,7 +212,6 @@ export type ActionBlockYAML = BlockYAMLBase & {
download_suffix?: string | null;
totp_verification_url?: string | null;
totp_identifier?: string | null;
cache_actions: boolean;
disable_cache: boolean;
engine: RunEngine | null;
};
@@ -231,7 +229,6 @@ export type NavigationBlockYAML = BlockYAMLBase & {
download_suffix?: string | null;
totp_verification_url?: string | null;
totp_identifier?: string | null;
cache_actions: boolean;
disable_cache: boolean;
complete_criterion: string | null;
terminate_criterion: string | null;
@@ -249,7 +246,6 @@ export type ExtractionBlockYAML = BlockYAMLBase & {
max_retries?: number;
max_steps_per_run?: number | null;
parameter_keys?: Array<string> | null;
cache_actions: boolean;
disable_cache: boolean;
engine: RunEngine | null;
};
@@ -265,7 +261,6 @@ export type LoginBlockYAML = BlockYAMLBase & {
parameter_keys?: Array<string> | null;
totp_verification_url?: string | null;
totp_identifier?: string | null;
cache_actions: boolean;
disable_cache: boolean;
complete_criterion: string | null;
terminate_criterion: string | null;
@@ -289,7 +284,6 @@ export type FileDownloadBlockYAML = BlockYAMLBase & {
download_suffix?: string | null;
totp_verification_url?: string | null;
totp_identifier?: string | null;
cache_actions: boolean;
disable_cache: boolean;
engine: RunEngine | null;
download_timeout?: number | null;