refactor(shared,config): remove redundant null checks and AI slop from code comments

This commit is contained in:
YeonGyu-Kim
2026-04-03 19:39:55 +09:00
parent d0f795dd8f
commit e0feb16dab
9 changed files with 10 additions and 48 deletions
+1 -2
View File
@@ -92,7 +92,7 @@ export function flattenToFallbackModelStrings(
// invalid strings like "provider/model high(low)".
const model = entry.model
.replace(/\([^()]+\)\s*$/, "")
.replace(/\s+([a-z][a-z0-9_-]*)\s*$/i, (match, suffix) => {
.replace(/\s+([a-z][a-z0-9_-]*)\s*$/i, (match: string, suffix: string) => {
const normalized = String(suffix).toLowerCase()
return KNOWN_VARIANTS.has(normalized)
? ""
@@ -101,7 +101,6 @@ export function flattenToFallbackModelStrings(
.trim()
return `${model}(${variant})`
}
// No explicit variant — preserve model string as-is (including any inline variant)
return entry.model
})
}