fix: address review feedback and code scanning alerts

This commit is contained in:
Cita
2026-03-22 23:41:45 +08:00
parent 32d7037629
commit 5d78658af9
38 changed files with 929 additions and 344 deletions
@@ -13,7 +13,11 @@ type FetchModelsOptions = {
};
export function normalizePlatformBaseUrl(baseUrl: string): string {
return (baseUrl || '').replace(/\/+$/, '');
let normalized = baseUrl || '';
while (normalized.endsWith('/')) {
normalized = normalized.slice(0, -1);
}
return normalized;
}
export function resolveVersionedModelsUrl(baseUrl: string): string {