Add max iterations override header (#1825)

This commit is contained in:
Shuchang Zheng
2025-02-24 09:37:02 -08:00
committed by GitHub
parent b9ccb5fbf0
commit d1b26d7068

View File

@@ -150,6 +150,7 @@ function PromptBox() {
);
const [publishWorkflow, setPublishWorkflow] = useState(false);
const [totpIdentifier, setTotpIdentifier] = useState("");
const [maxStepsOverride, setMaxStepsOverride] = useState<string | null>(null);
const [showAdvancedSettings, setShowAdvancedSettings] = useState(false);
const startObserverCruiseMutation = useMutation({
@@ -164,6 +165,11 @@ function PromptBox() {
totp_identifier: totpIdentifier,
publish_workflow: publishWorkflow,
},
{
headers: {
"x-max-iterations-override": maxStepsOverride,
},
},
);
},
onSuccess: (response) => {
@@ -384,6 +390,20 @@ function PromptBox() {
}}
/>
</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>
) : null}