From bbdd90058f73df2b490220ef0bd08f4d3284ccc8 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Wed, 5 Feb 2025 03:35:01 +0800 Subject: [PATCH] =?UTF-8?q?When=20observer=20run,=20use=20observer=20task?= =?UTF-8?q?=20to=20get=20callback=20url=20and=20proxy=20lo=E2=80=A6=20(#17?= =?UTF-8?q?19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skyvern-frontend/src/api/types.ts | 4 ++++ .../workflowRun/WorkflowPostRunParameters.tsx | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/skyvern-frontend/src/api/types.ts b/skyvern-frontend/src/api/types.ts index 189d189d..de57bffa 100644 --- a/skyvern-frontend/src/api/types.ts +++ b/skyvern-frontend/src/api/types.ts @@ -282,6 +282,10 @@ export type ObserverTask = { modified_at: string; output: Record | null; summary: string | null; + webhook_callback_url: string | null; + totp_verification_url: string | null; + totp_identifier: string | null; + proxy_location: ProxyLocation | null; }; export type Createv2TaskRequest = { diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowPostRunParameters.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowPostRunParameters.tsx index 2553b6fc..719746ed 100644 --- a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowPostRunParameters.tsx +++ b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowPostRunParameters.tsx @@ -44,6 +44,15 @@ function WorkflowPostRunParameters() { } const activeBlock = getActiveBlock(); + const isObserverTask = workflowRun.observer_task !== null; + + const webhookCallbackUrl = isObserverTask + ? workflowRun.observer_task?.webhook_callback_url + : workflowRun.webhook_callback_url; + + const proxyLocation = isObserverTask + ? workflowRun.observer_task?.proxy_location + : workflowRun.proxy_location; return (
@@ -125,14 +134,14 @@ function WorkflowPostRunParameters() {

Webhook Callback URL

- +

Proxy Location

{ // TODO }}