suchintan.vibe code user goal check (#2349)
Co-authored-by: lawyzheng <lawyzheng1106@gmail.com>
This commit is contained in:
@@ -38,7 +38,7 @@ import {
|
||||
CreateNewTaskFormValues,
|
||||
} from "./taskFormTypes";
|
||||
import { ProxySelector } from "@/components/ProxySelector";
|
||||
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
type Props = {
|
||||
initialValues: CreateNewTaskFormValues;
|
||||
};
|
||||
@@ -80,6 +80,8 @@ function createTaskRequestObject(
|
||||
extracted_information_schema: extractedInformationSchema,
|
||||
totp_identifier: transform(formValues.totpIdentifier),
|
||||
error_code_mapping: errorCodeMapping,
|
||||
include_action_history_in_verification:
|
||||
formValues.includeActionHistoryInVerification,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -425,6 +427,36 @@ function CreateNewTaskForm({ initialValues }: Props) {
|
||||
{isActive("advanced") && (
|
||||
<div className="space-y-6">
|
||||
<div className="space-y-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="includeActionHistoryInVerification"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<div className="flex gap-16">
|
||||
<FormLabel>
|
||||
<div className="w-72">
|
||||
<h1 className="text-lg">Include Action History</h1>
|
||||
<h2 className="text-base text-slate-400">
|
||||
Whether to include action history when verifying
|
||||
the task completion.
|
||||
</h2>
|
||||
</div>
|
||||
</FormLabel>
|
||||
<div className="w-full">
|
||||
<FormControl>
|
||||
<Switch
|
||||
checked={field.value ?? false}
|
||||
onCheckedChange={(checked) => {
|
||||
field.onChange(checked);
|
||||
}}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</div>
|
||||
</div>
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="maxStepsOverride"
|
||||
|
||||
@@ -61,6 +61,7 @@ function CreateNewTaskFormPage() {
|
||||
totpIdentifier: null,
|
||||
webhookCallbackUrl: null,
|
||||
proxyLocation: null,
|
||||
includeActionHistoryInVerification: null,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
@@ -127,6 +128,9 @@ function CreateNewTaskFormPage() {
|
||||
maxStepsOverride,
|
||||
totpIdentifier: data.workflow_definition.blocks[0].totp_identifier,
|
||||
errorCodeMapping: JSON.stringify(errorCodeMapping, null, 2),
|
||||
includeActionHistoryInVerification:
|
||||
data.workflow_definition.blocks[0]
|
||||
.include_action_history_in_verification,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -99,6 +99,8 @@ function createTaskTemplateRequestObject(values: SavedTaskFormValues) {
|
||||
max_steps_per_run: values.maxStepsOverride,
|
||||
totp_identifier: values.totpIdentifier,
|
||||
error_code_mapping: safeParseMaybeJSONString(values.errorCodeMapping),
|
||||
include_action_history_in_verification:
|
||||
values.includeActionHistoryInVerification,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -42,6 +42,8 @@ function RetryTask() {
|
||||
? JSON.stringify(task.request.error_code_mapping, null, 2)
|
||||
: "",
|
||||
proxyLocation: task.request.proxy_location ?? null,
|
||||
includeActionHistoryInVerification:
|
||||
task.request.include_action_history_in_verification ?? false,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@ const createNewTaskFormSchemaBase = z.object({
|
||||
totpIdentifier: z.string().or(z.null()),
|
||||
errorCodeMapping: z.string().or(z.null()),
|
||||
proxyLocation: z.nativeEnum(ProxyLocation).or(z.null()),
|
||||
includeActionHistoryInVerification: z.boolean().or(z.null()).default(false),
|
||||
});
|
||||
|
||||
const savedTaskFormSchemaBase = createNewTaskFormSchemaBase.extend({
|
||||
|
||||
Reference in New Issue
Block a user