From fc56299eac3d21272ee9d23b1985fb67b86917dd Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Wed, 4 Dec 2024 12:39:58 -0800 Subject: [PATCH] Show downloaded files in workflow run (#1321) --- skyvern-frontend/src/api/types.ts | 1 + .../src/routes/workflows/WorkflowRun.tsx | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/skyvern-frontend/src/api/types.ts b/skyvern-frontend/src/api/types.ts index 082a37ae4..526995b32 100644 --- a/skyvern-frontend/src/api/types.ts +++ b/skyvern-frontend/src/api/types.ts @@ -206,6 +206,7 @@ export type WorkflowRunStatusApiResponse = { recording_url: string | null; outputs: Record | null; failure_reason: string | null; + downloaded_file_urls: Array | null; }; export type TaskGenerationApiResponse = { diff --git a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx index 3ae78d103..939722736 100644 --- a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx +++ b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx @@ -49,6 +49,7 @@ import { import { cn } from "@/util/utils"; import { CopyIcon, + FileIcon, Pencil2Icon, PlayIcon, ReaderIcon, @@ -376,6 +377,8 @@ function WorkflowRun() { ); + const fileUrls = workflowRun?.downloaded_file_urls ?? []; + return (
@@ -625,6 +628,29 @@ function WorkflowRun() { />
)} + {workflowRunIsFinalized && ( +
+
+

Downloaded Files

+
+
+ {fileUrls.length > 0 ? ( + fileUrls.map((url) => { + return ( + + ); + }) + ) : ( +
No files downloaded
+ )} +
+
+ )} {Object.entries(parameters).length > 0 && (