- {t('providersPage.form.apiKeyEntry', { index: idx + 1 })}
+ {t('providersPage.form.apiKeyEntry', { index: realIdx + 1 })}
@@ -667,7 +681,7 @@ export function BaseProviderForm({
type="button"
className={styles.connectivityBtnGhost}
disabled={mutating || status.state === 'loading'}
- onClick={() => void connectivity.runOpenAIKey(idx)}
+ onClick={() => void connectivity.runOpenAIKey(realIdx)}
>
{status.state === 'loading' ? (
@@ -683,7 +697,7 @@ export function BaseProviderForm({
onClick={() =>
updateField(
'apiKeyEntries',
- apiKeyEntries.filter((_, i) => i !== idx)
+ apiKeyEntries.filter((_, i) => i !== realIdx)
)
}
>
@@ -703,7 +717,7 @@ export function BaseProviderForm({
updateField(
'apiKeyEntries',
apiKeyEntries.map((it, i) =>
- i === idx ? { ...it, apiKey: e.target.value } : it
+ i === realIdx ? { ...it, apiKey: e.target.value } : it
)
)
}
@@ -722,7 +736,7 @@ export function BaseProviderForm({
updateField(
'apiKeyEntries',
apiKeyEntries.map((it, i) =>
- i === idx ? { ...it, proxyUrl: e.target.value } : it
+ i === realIdx ? { ...it, proxyUrl: e.target.value } : it
)
)
}
@@ -746,7 +760,7 @@ export function BaseProviderForm({
updateField(
'apiKeyEntries',
apiKeyEntries.map((it, i) =>
- i === idx ? { ...it, headersText: e.target.value } : it
+ i === realIdx ? { ...it, headersText: e.target.value } : it
)
)
}
@@ -762,17 +776,6 @@ export function BaseProviderForm({
);
})}
-
) : null}
diff --git a/src/features/providers/sheets/forms/sharedForm.module.scss b/src/features/providers/sheets/forms/sharedForm.module.scss
index 9a1ecf8..0b8d3eb 100644
--- a/src/features/providers/sheets/forms/sharedForm.module.scss
+++ b/src/features/providers/sheets/forms/sharedForm.module.scss
@@ -221,6 +221,10 @@
margin-bottom: 2px;
}
+.entriesToolbarSplit {
+ justify-content: space-between;
+}
+
.connectivityRow {
display: flex;
align-items: center;