Add publish_workflow and totp_identifier fields in advanced settings (#1661)
Co-authored-by: Muhammed Salih Altun <muhammedsalihaltun@gmail.com>
This commit is contained in:
@@ -44,6 +44,7 @@ import {
|
|||||||
import { ExampleCasePill } from "./ExampleCasePill";
|
import { ExampleCasePill } from "./ExampleCasePill";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { ProxySelector } from "@/components/ProxySelector";
|
import { ProxySelector } from "@/components/ProxySelector";
|
||||||
|
import { Switch } from "@/components/ui/switch";
|
||||||
|
|
||||||
function createTemplateTaskFromTaskGenerationParameters(
|
function createTemplateTaskFromTaskGenerationParameters(
|
||||||
values: TaskGenerationApiResponse,
|
values: TaskGenerationApiResponse,
|
||||||
@@ -150,6 +151,8 @@ function PromptBox() {
|
|||||||
const [proxyLocation, setProxyLocation] = useState<ProxyLocation>(
|
const [proxyLocation, setProxyLocation] = useState<ProxyLocation>(
|
||||||
ProxyLocation.Residential,
|
ProxyLocation.Residential,
|
||||||
);
|
);
|
||||||
|
const [publishWorkflow, setPublishWorkflow] = useState(false);
|
||||||
|
const [totpIdentifier, setTotpIdentifier] = useState("");
|
||||||
const [showAdvancedSettings, setShowAdvancedSettings] = useState(false);
|
const [showAdvancedSettings, setShowAdvancedSettings] = useState(false);
|
||||||
|
|
||||||
const startObserverCruiseMutation = useMutation({
|
const startObserverCruiseMutation = useMutation({
|
||||||
@@ -161,6 +164,8 @@ function PromptBox() {
|
|||||||
user_prompt: prompt,
|
user_prompt: prompt,
|
||||||
webhook_callback_url: webhookCallbackUrl,
|
webhook_callback_url: webhookCallbackUrl,
|
||||||
proxy_location: proxyLocation,
|
proxy_location: proxyLocation,
|
||||||
|
totp_identifier: totpIdentifier,
|
||||||
|
publish_workflow: publishWorkflow,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -336,7 +341,7 @@ function PromptBox() {
|
|||||||
<div className="space-y-4 rounded-b-xl bg-slate-900 p-4">
|
<div className="space-y-4 rounded-b-xl bg-slate-900 p-4">
|
||||||
<header>Advanced Settings</header>
|
<header>Advanced Settings</header>
|
||||||
<div className="flex gap-16">
|
<div className="flex gap-16">
|
||||||
<div className="w-96">
|
<div className="w-48 shrink-0">
|
||||||
<div className="text-sm">Webhook Callback URL</div>
|
<div className="text-sm">Webhook Callback URL</div>
|
||||||
<div className="text-xs text-slate-400">
|
<div className="text-xs text-slate-400">
|
||||||
The URL of a webhook endpoint to send the extracted
|
The URL of a webhook endpoint to send the extracted
|
||||||
@@ -351,7 +356,7 @@ function PromptBox() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-16">
|
<div className="flex gap-16">
|
||||||
<div className="w-96">
|
<div className="w-48 shrink-0">
|
||||||
<div className="text-sm">Proxy Location</div>
|
<div className="text-sm">Proxy Location</div>
|
||||||
<div className="text-xs text-slate-400">
|
<div className="text-xs text-slate-400">
|
||||||
Route Skyvern through one of our available proxies.
|
Route Skyvern through one of our available proxies.
|
||||||
@@ -362,6 +367,34 @@ function PromptBox() {
|
|||||||
onChange={setProxyLocation}
|
onChange={setProxyLocation}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex gap-16">
|
||||||
|
<div className="w-48 shrink-0">
|
||||||
|
<div className="text-sm">2FA Identifier</div>
|
||||||
|
<div className="text-xs text-slate-400">
|
||||||
|
The identifier for a 2FA code for this task.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Input
|
||||||
|
value={totpIdentifier}
|
||||||
|
onChange={(event) => {
|
||||||
|
setTotpIdentifier(event.target.value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex gap-16">
|
||||||
|
<div className="w-48 shrink-0">
|
||||||
|
<div className="text-sm">Publish Workflow</div>
|
||||||
|
<div className="text-xs text-slate-400">
|
||||||
|
Whether to create a workflow alongside this task run.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Switch
|
||||||
|
checked={publishWorkflow}
|
||||||
|
onCheckedChange={(checked) => {
|
||||||
|
setPublishWorkflow(Boolean(checked));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user