Skip to content

Commit ca4d80b

Browse files
committed
🔄 synced local 'skyvern-frontend/src/' with remote 'skyvern-frontend/src/'
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Add `continueOnFailure` and `cacheActions` properties to node types and update workflow editor utilities for enhanced failure handling and action caching. > > - **Node Types**: > - Introduce `NodeBaseData` type with `label` and `continueOnFailure` properties in `types.ts`. > - Extend `NodeBaseData` in `CodeBlockNodeData`, `DownloadNodeData`, `FileParserNodeData`, `LoopNodeData`, `SendEmailNodeData`, `TaskNodeData`, `TextPromptNodeData`, and `UploadNodeData`. > - Add `continueOnFailure: false` to default data in `CodeBlockNode`, `DownloadNode`, `FileParserNode`, `LoopNode`, `SendEmailNode`, `TaskNode`, `TextPromptNode`, and `UploadNode`. > - Add `cacheActions: false` to `TaskNodeData` and default data in `TaskNode`. > - **Workflow Editor Utils**: > - Update `convertToNode()` and `getWorkflowBlock()` in `workflowEditorUtils.ts` to handle `continueOnFailure` and `cacheActions` properties. > - Use `NodeBaseData` for common node data handling in `convertToNode()`. > - **Types**: > - Add `cache_actions` to `TaskBlock` in `workflowTypes.ts` and `TaskBlockYAML` in `workflowYamlTypes.ts`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for 9c9dae06a80637bdd1e10e6b686fefef57cd4719. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
1 parent 575dd35 commit ca4d80b

File tree

12 files changed

+74
-52
lines changed

12 files changed

+74
-52
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Node } from "@xyflow/react";
2+
import { NodeBaseData } from "../types";
23

3-
export type CodeBlockNodeData = {
4+
export type CodeBlockNodeData = NodeBaseData & {
45
code: string;
56
editable: boolean;
6-
label: string;
77
};
88

99
export type CodeBlockNode = Node<CodeBlockNodeData, "codeBlock">;
@@ -12,4 +12,5 @@ export const codeBlockNodeDefaultData: CodeBlockNodeData = {
1212
editable: true,
1313
label: "",
1414
code: `# To assign a value to the output of this block,\n# assign the value to the variable 'result'\n# The final value of 'result' will be used as the output of this block\n\nresult = 5`,
15+
continueOnFailure: false,
1516
} as const;

‎skyvern-frontend/src/routes/workflows/editor/nodes/DownloadNode/types.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { Node } from "@xyflow/react";
22
import { SKYVERN_DOWNLOAD_DIRECTORY } from "../../constants";
3+
import { NodeBaseData } from "../types";
34

4-
export type DownloadNodeData = {
5+
export type DownloadNodeData = NodeBaseData & {
56
url: string;
67
editable: boolean;
7-
label: string;
88
};
99

1010
export type DownloadNode = Node<DownloadNodeData, "download">;
@@ -13,6 +13,7 @@ export const downloadNodeDefaultData: DownloadNodeData = {
1313
editable: true,
1414
label: "",
1515
url: SKYVERN_DOWNLOAD_DIRECTORY,
16+
continueOnFailure: false,
1617
} as const;
1718

1819
export const helpTooltipContent = {

‎skyvern-frontend/src/routes/workflows/editor/nodes/FileParserNode/types.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Node } from "@xyflow/react";
2+
import { NodeBaseData } from "../types";
23

3-
export type FileParserNodeData = {
4+
export type FileParserNodeData = NodeBaseData & {
45
fileUrl: string;
56
editable: boolean;
6-
label: string;
77
};
88

99
export type FileParserNode = Node<FileParserNodeData, "fileParser">;
@@ -12,6 +12,7 @@ export const fileParserNodeDefaultData: FileParserNodeData = {
1212
editable: true,
1313
label: "",
1414
fileUrl: "",
15+
continueOnFailure: false,
1516
} as const;
1617

1718
export const helpTooltipContent = {

‎skyvern-frontend/src/routes/workflows/editor/nodes/LoopNode/types.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Node } from "@xyflow/react";
2+
import { NodeBaseData } from "../types";
23

3-
export type LoopNodeData = {
4+
export type LoopNodeData = NodeBaseData & {
45
loopValue: string;
56
editable: boolean;
6-
label: string;
77
};
88

99
export type LoopNode = Node<LoopNodeData, "loop">;
@@ -12,6 +12,7 @@ export const loopNodeDefaultData: LoopNodeData = {
1212
editable: true,
1313
label: "",
1414
loopValue: "",
15+
continueOnFailure: false,
1516
} as const;
1617

1718
export function isLoopNode(node: Node): node is LoopNode {

‎skyvern-frontend/src/routes/workflows/editor/nodes/SendEmailNode/types.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import {
77
SMTP_PORT_PARAMETER_KEY,
88
SMTP_USERNAME_PARAMETER_KEY,
99
} from "../../constants";
10+
import { NodeBaseData } from "../types";
1011

11-
export type SendEmailNodeData = {
12+
export type SendEmailNodeData = NodeBaseData & {
1213
recipients: string;
1314
subject: string;
1415
body: string;
1516
fileAttachments: string;
1617
editable: boolean;
17-
label: string;
1818
sender: string;
1919
smtpHostSecretParameterKey?: string;
2020
smtpPortSecretParameterKey?: string;
@@ -36,6 +36,7 @@ export const sendEmailNodeDefaultData: SendEmailNodeData = {
3636
smtpPortSecretParameterKey: SMTP_PORT_PARAMETER_KEY,
3737
smtpUsernameSecretParameterKey: SMTP_USERNAME_PARAMETER_KEY,
3838
smtpPasswordSecretParameterKey: SMTP_PASSWORD_PARAMETER_KEY,
39+
continueOnFailure: false,
3940
} as const;
4041

4142
export const helpTooltipContent = {

‎skyvern-frontend/src/routes/workflows/editor/nodes/TaskNode/types.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Node } from "@xyflow/react";
2+
import { NodeBaseData } from "../types";
23

3-
export type TaskNodeData = {
4+
export type TaskNodeData = NodeBaseData & {
45
url: string;
56
navigationGoal: string;
67
dataExtractionGoal: string;
@@ -11,11 +12,10 @@ export type TaskNodeData = {
1112
allowDownloads: boolean;
1213
downloadSuffix: string | null;
1314
editable: boolean;
14-
label: string;
1515
parameterKeys: Array<string>;
1616
totpVerificationUrl: string | null;
1717
totpIdentifier: string | null;
18-
continueOnFailure: boolean;
18+
cacheActions: boolean;
1919
};
2020

2121
export type TaskNode = Node<TaskNodeData, "task">;
@@ -38,6 +38,7 @@ export const taskNodeDefaultData: TaskNodeData = {
3838
totpVerificationUrl: null,
3939
totpIdentifier: null,
4040
continueOnFailure: false,
41+
cacheActions: false,
4142
} as const;
4243

4344
export function isTaskNode(node: Node): node is TaskNode {

‎skyvern-frontend/src/routes/workflows/editor/nodes/TextPromptNode/types.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Node } from "@xyflow/react";
2+
import { NodeBaseData } from "../types";
23

3-
export type TextPromptNodeData = {
4+
export type TextPromptNodeData = NodeBaseData & {
45
prompt: string;
56
jsonSchema: string;
67
editable: boolean;
@@ -14,6 +15,7 @@ export const textPromptNodeDefaultData: TextPromptNodeData = {
1415
label: "",
1516
prompt: "",
1617
jsonSchema: "null",
18+
continueOnFailure: false,
1719
} as const;
1820

1921
export const helpTooltipContent = {

‎skyvern-frontend/src/routes/workflows/editor/nodes/UploadNode/types.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { Node } from "@xyflow/react";
22
import { SKYVERN_DOWNLOAD_DIRECTORY } from "../../constants";
3+
import { NodeBaseData } from "../types";
34

4-
export type UploadNodeData = {
5+
export type UploadNodeData = NodeBaseData & {
56
path: string;
67
editable: boolean;
7-
label: string;
88
};
99

1010
export type UploadNode = Node<UploadNodeData, "upload">;
@@ -13,6 +13,7 @@ export const uploadNodeDefaultData: UploadNodeData = {
1313
editable: true,
1414
label: "",
1515
path: SKYVERN_DOWNLOAD_DIRECTORY,
16+
continueOnFailure: false,
1617
} as const;
1718

1819
export const helpTooltipContent = {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export type NodeBaseData = {
2+
label: string;
3+
continueOnFailure: boolean;
4+
};

0 commit comments

Comments
 (0)