fix(lint): add curly braces to if statements to satisfy oxlint curly rule

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Emanuel Ciuca 2026-03-20 18:18:09 +02:00
parent f228ccc1e9
commit 8e3987d66f
2 changed files with 9 additions and 3 deletions

View File

@ -25,7 +25,9 @@ export default definePluginEntry({
const providers = config?.models?.providers;
if (providers) {
for (const [key, value] of Object.entries(providers)) {
if (normalizeProviderId(key) !== PROVIDER_ID) continue;
if (normalizeProviderId(key) !== PROVIDER_ID) {
continue;
}
const models = (value as { models?: Array<{ id?: string; name?: string }> })?.models;
const modelDef = models?.find((m) => m.id === modelId);
if (modelDef?.name) {

View File

@ -409,7 +409,9 @@ export function isAnthropicBedrockModel(modelId: string, modelName?: string): bo
normalized.includes(":application-inference-profile/")
) {
const profileId = normalized.split(":application-inference-profile/")[1] ?? "";
if (profileId.includes("claude")) return true;
if (profileId.includes("claude")) {
return true;
}
return modelName ? modelName.toLowerCase().includes("claude") : false;
}
@ -419,7 +421,9 @@ export function isAnthropicBedrockModel(modelId: string, modelName?: string): bo
// Note: the regex is intentionally broad; it is safe because standard Bedrock model IDs
// always contain dots or colons (e.g. "amazon.nova-micro-v1:0") which exclude them here.
if (looksLikeShortProfileId(normalized)) {
if (normalized.includes("claude")) return true;
if (normalized.includes("claude")) {
return true;
}
return modelName ? modelName.toLowerCase().includes("claude") : false;
}