Skip to content

Automate browser based workflows with AI

When observer run, use observer task to get callback url and proxy lo… (#1719)

Shuchang Zhengbbdd90058f73
diff --git a/skyvern-frontend/src/api/types.ts b/skyvern-frontend/src/api/types.ts
index 189d189d9..de57bffa5 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<string, unknown> | 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 2553b6fc3..719746ede 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 (
<div className="space-y-5">
@@ -125,14 +134,14 @@ function WorkflowPostRunParameters() {
<div className="w-80">
<h1 className="text-lg">Webhook Callback URL</h1>
</div>
- <Input value={workflowRun.webhook_callback_url ?? ""} readOnly />
+ <Input value={webhookCallbackUrl ?? ""} readOnly />
</div>
<div className="flex gap-16">
<div className="w-80">
<h1 className="text-lg">Proxy Location</h1>
</div>
<ProxySelector
- value={workflowRun.proxy_location ?? ProxyLocation.Residential}
+ value={proxyLocation ?? ProxyLocation.Residential}
onChange={() => {
// TODO
}}