fix(types): replace normalizeApiFormat() calls with direct value
All checks were successful
Test / rust-clippy (pull_request) Successful in 20m48s
Test / frontend-tests (pull_request) Successful in 2m10s
Test / frontend-typecheck (pull_request) Successful in 2m12s
Test / rust-fmt-check (pull_request) Successful in 4m40s
Test / rust-tests (pull_request) Successful in 22m14s
All checks were successful
Test / rust-clippy (pull_request) Successful in 20m48s
Test / frontend-tests (pull_request) Successful in 2m10s
Test / frontend-typecheck (pull_request) Successful in 2m12s
Test / rust-fmt-check (pull_request) Successful in 4m40s
Test / rust-tests (pull_request) Successful in 22m14s
The normalizeApiFormat helper (which mapped the legacy format identifier to custom_rest) was removed but still referenced in 4 call sites. Replace each call with the underlying value directly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9a132cce74
commit
0251397836
@ -110,7 +110,7 @@ export default function AIProviders() {
|
||||
|
||||
const startEdit = (index: number) => {
|
||||
const provider = ai_providers[index];
|
||||
const apiFormat = normalizeApiFormat(provider.api_format);
|
||||
const apiFormat = provider.api_format;
|
||||
const nextForm = { ...provider, api_format: apiFormat };
|
||||
|
||||
setForm(nextForm);
|
||||
@ -329,7 +329,7 @@ export default function AIProviders() {
|
||||
placeholder="sk-..."
|
||||
/>
|
||||
</div>
|
||||
{!(form.provider_type === "custom" && normalizeApiFormat(form.api_format) === CUSTOM_REST_FORMAT) && (
|
||||
{!(form.provider_type === "custom" && form.api_format === CUSTOM_REST_FORMAT) && (
|
||||
<div className="space-y-2">
|
||||
<Label>Model</Label>
|
||||
<Input
|
||||
@ -447,7 +447,7 @@ export default function AIProviders() {
|
||||
</div>
|
||||
|
||||
{/* Custom REST specific: User ID field */}
|
||||
{normalizeApiFormat(form.api_format) === CUSTOM_REST_FORMAT && (
|
||||
{form.api_format === CUSTOM_REST_FORMAT && (
|
||||
<div className="space-y-2">
|
||||
<Label>Email Address</Label>
|
||||
<Input
|
||||
@ -462,7 +462,7 @@ export default function AIProviders() {
|
||||
)}
|
||||
|
||||
{/* Custom REST specific: model dropdown with custom option */}
|
||||
{normalizeApiFormat(form.api_format) === CUSTOM_REST_FORMAT && (
|
||||
{form.api_format === CUSTOM_REST_FORMAT && (
|
||||
<div className="space-y-2">
|
||||
<Label>Model</Label>
|
||||
<Select
|
||||
|
||||
Loading…
Reference in New Issue
Block a user