diff --git a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx index e630dd9a..769b08a5 100644 --- a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx +++ b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx @@ -39,9 +39,13 @@ import { TaskActions } from "../tasks/list/TaskActions"; import { TaskListSkeletonRows } from "../tasks/list/TaskListSkeletonRows"; import { useEffect, useState } from "react"; import { statusIsNotFinalized, statusIsRunningOrQueued } from "../tasks/types"; -import { envCredential } from "@/util/env"; +import { apiBaseUrl, envCredential } from "@/util/env"; import { toast } from "@/components/ui/use-toast"; -import { Pencil2Icon, PlayIcon } from "@radix-ui/react-icons"; +import { CopyIcon, Pencil2Icon, PlayIcon } from "@radix-ui/react-icons"; +import { useWorkflowQuery } from "./hooks/useWorkflowQuery"; +import fetchToCurl from "fetch-to-curl"; +import { useApiCredential } from "@/hooks/useApiCredential"; +import { copyText } from "@/util/copyText"; type StreamMessage = { task_id: string; @@ -60,6 +64,12 @@ function WorkflowRun() { const credentialGetter = useCredentialGetter(); const [streamImgSrc, setStreamImgSrc] = useState(""); const navigate = useNavigate(); + const apiCredential = useApiCredential(); + + const { data: workflow, isLoading: workflowIsLoading } = useWorkflowQuery({ + workflowPermanentId, + }); + const { data: workflowRun, isLoading: workflowRunIsLoading } = useQuery({ queryKey: ["workflowRun", workflowPermanentId, workflowRunId], @@ -228,15 +238,56 @@ function WorkflowRun() { return (
-
-

{workflowRunId}

- {workflowRunIsLoading ? ( - - ) : workflowRun ? ( - - ) : null} +
+
+

{workflowRunId}

+ {workflowRunIsLoading ? ( + + ) : workflowRun ? ( + + ) : null} +
+

+ {workflowIsLoading ? ( + + ) : ( + workflow?.title + )} +

+
+