Add max iterations override header (#1825)
This commit is contained in:
@@ -150,6 +150,7 @@ function PromptBox() {
|
|||||||
);
|
);
|
||||||
const [publishWorkflow, setPublishWorkflow] = useState(false);
|
const [publishWorkflow, setPublishWorkflow] = useState(false);
|
||||||
const [totpIdentifier, setTotpIdentifier] = useState("");
|
const [totpIdentifier, setTotpIdentifier] = useState("");
|
||||||
|
const [maxStepsOverride, setMaxStepsOverride] = useState<string | null>(null);
|
||||||
const [showAdvancedSettings, setShowAdvancedSettings] = useState(false);
|
const [showAdvancedSettings, setShowAdvancedSettings] = useState(false);
|
||||||
|
|
||||||
const startObserverCruiseMutation = useMutation({
|
const startObserverCruiseMutation = useMutation({
|
||||||
@@ -164,6 +165,11 @@ function PromptBox() {
|
|||||||
totp_identifier: totpIdentifier,
|
totp_identifier: totpIdentifier,
|
||||||
publish_workflow: publishWorkflow,
|
publish_workflow: publishWorkflow,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
"x-max-iterations-override": maxStepsOverride,
|
||||||
|
},
|
||||||
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
onSuccess: (response) => {
|
onSuccess: (response) => {
|
||||||
@@ -384,6 +390,20 @@ function PromptBox() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex gap-16">
|
||||||
|
<div className="w-48 shrink-0">
|
||||||
|
<div className="text-sm">Max Steps Override</div>
|
||||||
|
<div className="text-xs text-slate-400">
|
||||||
|
The maximum number of steps to take for this task.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Input
|
||||||
|
value={maxStepsOverride ?? ""}
|
||||||
|
onChange={(event) => {
|
||||||
|
setMaxStepsOverride(event.target.value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user