Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
use new run URLs, attempt iii (#3938)
Jonathan Dobsonf291e95f9649
diff --git a/skyvern-frontend/src/routes/workflows/hooks/useWorkflowRunQuery.ts b/skyvern-frontend/src/routes/workflows/hooks/useWorkflowRunQuery.tsindex dba94835d..3676febfa 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.tsxindex 00b4f5e31..ff3e6f320 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<string>("");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.tsindex 68839457a..6170b31e6 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,