diff --git a/skyvern-frontend/src/routes/workflows/hooks/useWorkflowRunQuery.ts b/skyvern-frontend/src/routes/workflows/hooks/useWorkflowRunQuery.ts index dba94835..3676febf 100644 --- a/skyvern-frontend/src/routes/workflows/hooks/useWorkflowRunQuery.ts +++ b/skyvern-frontend/src/routes/workflows/hooks/useWorkflowRunQuery.ts @@ -1,6 +1,7 @@ import { getClient } from "@/api/AxiosClient"; import { WorkflowRunStatusApiResponse } from "@/api/types"; import { useCredentialGetter } from "@/hooks/useCredentialGetter"; +import { useFirstParam } from "@/hooks/useFirstParam"; import { statusIsNotFinalized, statusIsRunningOrQueued, @@ -10,7 +11,8 @@ import { useParams } from "react-router-dom"; import { useGlobalWorkflowsQuery } from "./useGlobalWorkflowsQuery"; function useWorkflowRunQuery() { - const { workflowRunId, workflowPermanentId } = useParams(); + const workflowRunId = useFirstParam("workflowRunId", "runId"); + const { workflowPermanentId } = useParams(); const credentialGetter = useCredentialGetter(); const { data: globalWorkflows } = useGlobalWorkflowsQuery(); diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunStream.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunStream.tsx index 00b4f5e3..ff3e6f32 100644 --- a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunStream.tsx +++ b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunStream.tsx @@ -4,7 +4,7 @@ import { ZoomableImage } from "@/components/ZoomableImage"; import { useEffect, useState } from "react"; import { statusIsNotFinalized } from "@/routes/tasks/types"; import { useCredentialGetter } from "@/hooks/useCredentialGetter"; -import { useParams } from "react-router-dom"; +import { useFirstParam } from "@/hooks/useFirstParam"; import { getRuntimeApiKey } from "@/util/env"; import { toast } from "@/components/ui/use-toast"; import { useQueryClient } from "@tanstack/react-query"; @@ -25,12 +25,12 @@ const wssBaseUrl = import.meta.env.VITE_WSS_BASE_URL; function WorkflowRunStream(props?: Props) { const alwaysShowStream = props?.alwaysShowStream ?? false; + const workflowRunId = useFirstParam("workflowRunId", "runId"); const { data: workflowRun } = useWorkflowRunWithWorkflowQuery(); const [streamImgSrc, setStreamImgSrc] = useState(""); const showStream = alwaysShowStream || (workflowRun && statusIsNotFinalized(workflowRun)); const credentialGetter = useCredentialGetter(); - const { workflowRunId } = useParams(); const workflow = workflowRun?.workflow; const workflowPermanentId = workflow?.workflow_permanent_id; const queryClient = useQueryClient(); diff --git a/skyvern-frontend/src/util/env.ts b/skyvern-frontend/src/util/env.ts index 68839457..6170b31e 100644 --- a/skyvern-frontend/src/util/env.ts +++ b/skyvern-frontend/src/util/env.ts @@ -94,7 +94,7 @@ function clearRuntimeApiKey(): void { } } -const useNewRunsUrl = false as const; +const useNewRunsUrl = true as const; export { apiBaseUrl,