mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-13 10:43:43 +03:00
fix(ui): group reasoning replay with connection controls
This commit is contained in:
@@ -657,6 +657,19 @@ export default function EditConnectionModal({
|
||||
? ERROR_TYPE_LABELS[testResult.diagnosis.type] || null
|
||||
: null;
|
||||
|
||||
const preserveEncryptedReasoningToggle = isResponsesConnection ? (
|
||||
<Toggle
|
||||
checked={formData.preserveEncryptedReasoning}
|
||||
onChange={(checked) => setFormData({ ...formData, preserveEncryptedReasoning: checked })}
|
||||
label={providerText(t, "preserveEncryptedReasoningLabel", "Preserve encrypted reasoning")}
|
||||
description={providerText(
|
||||
t,
|
||||
"preserveEncryptedReasoningDescription",
|
||||
"Forward encrypted Responses reasoning items supplied by the client."
|
||||
)}
|
||||
/>
|
||||
) : null;
|
||||
|
||||
return (
|
||||
<Modal isOpen={isOpen} title={t("editConnection")} onClose={onClose}>
|
||||
<div className="flex flex-col gap-4">
|
||||
@@ -750,6 +763,7 @@ export default function EditConnectionModal({
|
||||
description={t("importFreeModelsOnlyHint")}
|
||||
/>
|
||||
)}
|
||||
{preserveEncryptedReasoningToggle}
|
||||
<Toggle
|
||||
checked={formData.disableCooling}
|
||||
onChange={(checked) => setFormData({ ...formData, disableCooling: checked })}
|
||||
@@ -1090,25 +1104,6 @@ export default function EditConnectionModal({
|
||||
/>
|
||||
)}
|
||||
|
||||
{isResponsesConnection && (
|
||||
<Toggle
|
||||
checked={formData.preserveEncryptedReasoning}
|
||||
onChange={(checked) =>
|
||||
setFormData({ ...formData, preserveEncryptedReasoning: checked })
|
||||
}
|
||||
label={providerText(
|
||||
t,
|
||||
"preserveEncryptedReasoningLabel",
|
||||
"Preserve encrypted reasoning"
|
||||
)}
|
||||
description={providerText(
|
||||
t,
|
||||
"preserveEncryptedReasoningDescription",
|
||||
"Forward encrypted Responses reasoning items supplied by the client."
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
|
||||
<ProviderRegionField
|
||||
provider={provider}
|
||||
value={formData.region}
|
||||
|
||||
@@ -261,6 +261,11 @@ describe("EditConnectionModal — encrypted Responses reasoning", () => {
|
||||
expect(
|
||||
el.querySelector('button[role="switch"][aria-label="openaiResponsesStoreLabel"]')
|
||||
).toBeTruthy();
|
||||
const cooldownToggle = el.querySelector<HTMLButtonElement>(
|
||||
'button[role="switch"][aria-label="disableCoolingLabel"]'
|
||||
)!;
|
||||
const reasoningToggle = el.querySelector<HTMLButtonElement>(PRESERVE_TOGGLE)!;
|
||||
expect(reasoningToggle.parentElement?.nextElementSibling).toBe(cooldownToggle.parentElement);
|
||||
const saveBtn = Array.from(el.querySelectorAll("button")).find(
|
||||
(button) => button.textContent?.trim() === "save"
|
||||
)!;
|
||||
|
||||
Reference in New Issue
Block a user