From 88ed706fea36e326b87b794488539103a0ac3290 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Fri, 13 Dec 2024 14:05:37 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'skyvern-fronte?= =?UTF-8?q?nd/src/'=20with=20remote=20'skyvern-frontend/src/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > [!IMPORTANT] > Add `completeCriterion` and `terminateCriterion` fields to `TaskNode` for enhanced task completion criteria handling. > > - **Behavior**: > - Add `completeCriterion` and `terminateCriterion` fields to `TaskNode` in `TaskNode.tsx`. > - Render `completeCriterion` input in `TaskNode` UI. > - **Data Handling**: > - Update `TaskNodeData` type in `types.ts` to include `completeCriterion` and `terminateCriterion`. > - Modify `convertToNode()` and `getWorkflowBlock()` in `workflowEditorUtils.ts` to handle new fields. > - **YAML Conversion**: > - Update `TaskBlockYAML` type in `workflowYamlTypes.ts` to include `completeCriterion` and `terminateCriterion`. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral) for c2e67dce21e523632dd4fc381e5e01ad4999cc88. It will automatically update as commits are pushed. --- .../editor/nodes/LoginNode/LoginNode.tsx | 2 +- .../nodes/NavigationNode/NavigationNode.tsx | 2 +- .../editor/nodes/TaskNode/TaskNode.tsx | 18 +++++++++++++++++- .../workflows/editor/nodes/TaskNode/types.ts | 4 ++++ .../workflows/editor/workflowEditorUtils.ts | 6 ++++++ .../routes/workflows/types/workflowTypes.ts | 2 ++ .../workflows/types/workflowYamlTypes.ts | 2 ++ 7 files changed, 33 insertions(+), 3 deletions(-) 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 5ac3cdad8..43119f6ee 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/LoginNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/LoginNode/LoginNode.tsx @@ -53,7 +53,7 @@ function LoginNode({ id, data }: NodeProps) { } return ( -
+
) { } return ( -
+
) { url: data.url, navigationGoal: data.navigationGoal, dataExtractionGoal: data.dataExtractionGoal, + completeCriterion: data.completeCriterion, + terminateCriterion: data.terminateCriterion, dataSchema: data.dataSchema, maxRetries: data.maxRetries, maxStepsOverride: data.maxStepsOverride, @@ -72,7 +74,7 @@ function TaskNode({ id, data }: NodeProps) { } return ( -
+
) { Advanced Settings
+
+ + { + handleChange("completeCriterion", value); + }} + value={inputs.completeCriterion} + className="nopan text-xs" + /> +
+