Skip to content

Automate browser based workflows with AI

Show task v2 output instead of extracted information (#2034)

Shuchang Zheng98c889706911
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx
index a7ac0e614..a69c2c94c 100644
--- a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx
+++ b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx
@@ -146,6 +146,8 @@ function WorkflowRun() {
aggregatedExtractedInformation,
).some((value) => value !== null);
+ const hasTaskv2Output = Boolean(isTaskv2Run && workflowRun.task_v2?.output);
+
const hasFileUrls =
isFetched &&
workflowRun &&
@@ -155,11 +157,12 @@ function WorkflowRun() {
? (workflowRun.downloaded_file_urls as string[])
: [];
- const showBoth = hasSomeExtractedInformation && hasFileUrls;
+ const showBoth =
+ (hasSomeExtractedInformation || hasTaskv2Output) && hasFileUrls;
const showOutputSection =
workflowRunIsFinalized &&
- (hasSomeExtractedInformation || hasFileUrls) &&
+ (hasSomeExtractedInformation || hasFileUrls || hasTaskv2Output) &&
workflowRun.status === Status.Completed;
return (
@@ -269,12 +272,18 @@ function WorkflowRun() {
"grid-cols-2": showBoth,
})}
>
- {hasSomeExtractedInformation && (
+ {(hasSomeExtractedInformation || hasTaskv2Output) && (
<div className="space-y-4">
- <Label>Extracted Information</Label>
+ <Label>
+ {hasTaskv2Output ? "Output" : "Extracted Information"}
+ </Label>
<CodeEditor
language="json"
- value={JSON.stringify(aggregatedExtractedInformation, null, 2)}
+ value={
+ hasTaskv2Output
+ ? JSON.stringify(workflowRun.task_v2?.output, null, 2)
+ : JSON.stringify(aggregatedExtractedInformation, null, 2)
+ }
readOnly
maxHeight="250px"
/>