()
| 681 | } |
| 682 | |
| 683 | function initInputPage() { |
| 684 | const confirmBtn = $("confirmBtn"); |
| 685 | const errorMsg = $("errorMsg"); |
| 686 | const providerInput = $("provider"); |
| 687 | const imageProviderInput = $("imageProvider"); |
| 688 | const imageModelInput = $("imageModel"); |
| 689 | const svgModelInput = $("svgModel"); |
| 690 | const providerButtons = $("providerButtons"); |
| 691 | const imageProviderButtons = $("imageProviderButtons"); |
| 692 | const imageRouteSummary = $("imageRouteSummary"); |
| 693 | const svgRouteSummary = $("svgRouteSummary"); |
| 694 | const routeSummaryNote = $("routeSummaryNote"); |
| 695 | const uploadZone = $("uploadZone"); |
| 696 | const referenceFile = $("referenceFile"); |
| 697 | const referencePreview = $("referencePreview"); |
| 698 | const referenceStatus = $("referenceStatus"); |
| 699 | const imageSizeGroup = $("imageSizeGroup"); |
| 700 | const imageSizeInput = $("imageSize"); |
| 701 | const imageModelGroup = $("imageModelGroup"); |
| 702 | const svgModelGroup = $("svgModelGroup"); |
| 703 | const baseUrlGroup = $("baseUrlGroup"); |
| 704 | const baseUrlInput = $("baseUrl"); |
| 705 | const imageApiKeyGroup = $("imageApiKeyGroup"); |
| 706 | const imageApiKeyInput = $("imageApiKey"); |
| 707 | const imageApiKeyHint = $("imageApiKeyHint"); |
| 708 | const imageBaseUrlGroup = $("imageBaseUrlGroup"); |
| 709 | const imageBaseUrlInput = $("imageBaseUrl"); |
| 710 | const imageBaseUrlHint = $("imageBaseUrlHint"); |
| 711 | const upscaleEnabled = $("upscaleEnabled"); |
| 712 | const samBackend = $("samBackend"); |
| 713 | const samPrompt = $("samPrompt"); |
| 714 | const samApiKeyGroup = $("samApiKeyGroup"); |
| 715 | const samApiKeyInput = $("samApiKey"); |
| 716 | let uploadedReferencePath = null; |
| 717 | |
| 718 | function getProviderLabel(provider) { |
| 719 | const normalized = normalizeProviderValue(provider); |
| 720 | if (normalized === "openai_response") { |
| 721 | return t("providers.openai_response"); |
| 722 | } |
| 723 | if (normalized === "openrouter") { |
| 724 | return t("providers.openrouter"); |
| 725 | } |
| 726 | if (normalized === "gemini") { |
| 727 | return t("providers.gemini"); |
| 728 | } |
| 729 | return t("providers.custom"); |
| 730 | } |
| 731 | |
| 732 | function getImageProviderLabel(provider) { |
| 733 | const normalized = normalizeImageProviderValue(provider); |
| 734 | if (normalized === "same") { |
| 735 | return t("providers.same_as_svg"); |
| 736 | } |
| 737 | if (normalized === "openai") { |
| 738 | return t("providers.openai_images"); |
| 739 | } |
| 740 | return getProviderLabel(normalized); |
no test coverage detected