()
| 1424 | } |
| 1425 | |
| 1426 | function syncProviderDefaults() { |
| 1427 | const provider = normalizeProviderValue(providerInput?.value ?? "gemini"); |
| 1428 | const nextDefault = getDefaultSvgModel(provider); |
| 1429 | const previousDefault = svgModelInput?.dataset.suggestedDefault || ""; |
| 1430 | const currentValue = svgModelInput?.value.trim() || ""; |
| 1431 | if (svgModelInput) { |
| 1432 | if (!currentValue || currentValue === previousDefault) { |
| 1433 | svgModelInput.value = nextDefault; |
| 1434 | } |
| 1435 | svgModelInput.dataset.suggestedDefault = nextDefault; |
| 1436 | svgModelInput.placeholder = nextDefault; |
| 1437 | } |
| 1438 | if (baseUrlGroup) { |
| 1439 | baseUrlGroup.hidden = provider !== "custom"; |
| 1440 | } |
| 1441 | if (baseUrlInput && !baseUrlInput.value.trim()) { |
| 1442 | baseUrlInput.value = DEFAULT_CUSTOM_BASE_URL; |
| 1443 | } |
| 1444 | saveImportState(); |
| 1445 | } |
| 1446 | |
| 1447 | function syncSamApiKeyVisibility() { |
| 1448 | const shouldShow = |
no test coverage detected