chore: Lint extensions folder.

This commit is contained in:
cpojer
2026-01-31 22:13:48 +09:00
parent 4f2166c503
commit 230ca789e2
221 changed files with 4006 additions and 1583 deletions

View File

@@ -21,10 +21,16 @@ const DEFAULT_MODEL_IDS = [
function normalizeBaseUrl(value: string): string {
const trimmed = value.trim();
if (!trimmed) return DEFAULT_BASE_URL;
if (!trimmed) {
return DEFAULT_BASE_URL;
}
let normalized = trimmed;
while (normalized.endsWith("/")) normalized = normalized.slice(0, -1);
if (!normalized.endsWith("/v1")) normalized = `${normalized}/v1`;
while (normalized.endsWith("/")) {
normalized = normalized.slice(0, -1);
}
if (!normalized.endsWith("/v1")) {
normalized = `${normalized}/v1`;
}
return normalized;
}