From 309176ef4b316e7641a757bcf46675fef11c9647 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Thu, 4 Sep 2025 11:04:28 -0700 Subject: [PATCH] remove orgwalls for caching (#3357) (#3360) --- .../src/routes/tasks/create/PromptBox.tsx | 30 +++-- .../workflows/editor/WorkflowHeader.tsx | 105 ++++++++-------- .../workflows/editor/nodes/NodeActionMenu.tsx | 21 ++-- .../editor/nodes/StartNode/StartNode.tsx | 112 +++++++++--------- 4 files changed, 127 insertions(+), 141 deletions(-) diff --git a/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx b/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx index 90ee5912..1a91c249 100644 --- a/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx +++ b/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx @@ -48,7 +48,6 @@ import { MAX_SCREENSHOT_SCROLLS_DEFAULT, MAX_STEPS_DEFAULT, } from "@/routes/workflows/editor/nodes/Taskv2Node/types"; -import { OrgWalled } from "@/components/Orgwalled"; function createTemplateTaskFromTaskGenerationParameters( values: TaskGenerationApiResponse, @@ -471,23 +470,22 @@ function PromptBox() { /> - -
-
-
Generate Script
-
- Whether to generate scripts for this task run (on - success). -
+ +
+
+
Generate Script
+
+ Whether to generate scripts for this task run (on + success).
- { - setGenerateScript(Boolean(checked)); - }} - />
- + { + setGenerateScript(Boolean(checked)); + }} + /> +
Publish Workflow
diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowHeader.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowHeader.tsx index ae17f4db..cadbc36d 100644 --- a/skyvern-frontend/src/routes/workflows/editor/WorkflowHeader.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowHeader.tsx @@ -30,7 +30,6 @@ import { useWorkflowHasChangesStore } from "@/store/WorkflowHasChangesStore"; import { cn } from "@/util/utils"; import { WorkflowApiResponse } from "../types/workflowTypes"; import { CacheKeyValuesResponse } from "@/routes/workflows/types/scriptTypes"; -import { OrgWalled } from "@/components/Orgwalled"; interface Dom { input: React.MutableRefObject; @@ -126,64 +125,62 @@ function WorkflowHeader({
{user && workflow.generate_script && ( // (cacheKeyValues?.total_count ?? 0) > 0 && ( - -
- { - setChosenCacheKeyValue(e.target.value); - onCacheKeyValuesFilter(e.target.value); - }} - onMouseDown={() => { - if (!cacheKeyValuesPanelOpen) { - onCacheKeyValuesClick(); - } - }} - onKeyDown={(e) => { - if (e.key === "Enter") { - const numFiltered = cacheKeyValues?.values?.length ?? 0; +
+ { + setChosenCacheKeyValue(e.target.value); + onCacheKeyValuesFilter(e.target.value); + }} + onMouseDown={() => { + if (!cacheKeyValuesPanelOpen) { + onCacheKeyValuesClick(); + } + }} + onKeyDown={(e) => { + if (e.key === "Enter") { + const numFiltered = cacheKeyValues?.values?.length ?? 0; - if (numFiltered === 1) { - const first = cacheKeyValues?.values?.[0]; - if (first) { - setChosenCacheKeyValue(first); - onCacheKeyValueAccept(first); - } - return; + if (numFiltered === 1) { + const first = cacheKeyValues?.values?.[0]; + if (first) { + setChosenCacheKeyValue(first); + onCacheKeyValueAccept(first); } - - setChosenCacheKeyValue(chosenCacheKeyValue); - onCacheKeyValueAccept(chosenCacheKeyValue); + return; } - onCacheKeyValuesKeydown(e); - }} - placeholder="Code Key Value" - value={chosenCacheKeyValue ?? undefined} - onBlur={(e) => { - onCacheKeyValuesBlurred(e.target.value); - setChosenCacheKeyValue(e.target.value); + + setChosenCacheKeyValue(chosenCacheKeyValue); + onCacheKeyValueAccept(chosenCacheKeyValue); + } + onCacheKeyValuesKeydown(e); + }} + placeholder="Code Key Value" + value={chosenCacheKeyValue ?? undefined} + onBlur={(e) => { + onCacheKeyValuesBlurred(e.target.value); + setChosenCacheKeyValue(e.target.value); + }} + /> + {cacheKeyValuesPanelOpen ? ( + + ) : ( + { + dom.input.current?.focus(); + onCacheKeyValuesClick(); }} /> - {cacheKeyValuesPanelOpen ? ( - - ) : ( - { - dom.input.current?.focus(); - onCacheKeyValuesClick(); - }} - /> - )} -
- + )} +
)} {isGlobalWorkflow ? ( -
+
Start
@@ -227,58 +224,57 @@ function StartNode({ id, data }: NodeProps) { }} />
- -
-
-
- - - { - handleChange("useScriptCache", value); + +
+
+
+ + + { + handleChange("useScriptCache", value); + }} + /> +
+
+ {inputs.useScriptCache && ( +
+
+
+ + +
+ { + const v = value.length ? value : null; + handleChange("scriptCacheKey", v); }} + value={inputs.scriptCacheKey ?? ""} + placeholder={ + placeholders["scripts"]["scriptKey"] + } + className="nopan text-xs" />
-
- {inputs.useScriptCache && ( -
-
-
- - -
- { - const v = value.length ? value : null; - handleChange("scriptCacheKey", v); +
+
+ + + { + handleChange("aiFallback", value); }} - value={inputs.scriptCacheKey ?? ""} - placeholder={ - placeholders["scripts"]["scriptKey"] - } - className="nopan text-xs" />
-
-
- - - { - handleChange("aiFallback", value); - }} - /> -
-
- )} -
- +
+ )} +