Skip to content

Commit

Permalink
When observer run, use observer task to get callback url and proxy lo… (
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Feb 4, 2025
1 parent 0c0a368 commit bbdd900
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions skyvern-frontend/src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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
}}
Expand Down

0 comments on commit bbdd900

Please sign in to comment.