standardize modal dropdown ID: use 'modal-model-selection' consistently
This commit is contained in:
parent
f939d1c782
commit
f304b6f634
2 changed files with 3 additions and 6 deletions
|
|
@ -46,9 +46,6 @@ export async function fetchModelsFromEndpoints() {
|
|||
const useCustomAPI = localStorage.getItem("useCustomAPI") === "true";
|
||||
const customBaseURL = localStorage.getItem("customBaseURL");
|
||||
|
||||
console.log("🔍 DEBUG: useCustomAPI =", localStorage.getItem("useCustomAPI"));
|
||||
console.log("🔍 DEBUG: customBaseURL =", customBaseURL);
|
||||
console.log("🔍 DEBUG: useCustomAPI && customBaseURL =", useCustomAPI && customBaseURL);
|
||||
|
||||
if (useCustomAPI && customBaseURL) {
|
||||
console.log("🔧 Adding custom API endpoint to model fetch:", customBaseURL);
|
||||
|
|
@ -239,7 +236,7 @@ export function addRefreshModelsButton() {
|
|||
// Helper function to get the selected model from the dropdown.
|
||||
export function getSelectedModel() {
|
||||
// Check modal dropdown first
|
||||
const modalDropdown = document.getElementById("hermes-model-selection");
|
||||
const modalDropdown = document.getElementById("modal-model-selection");
|
||||
if (modalDropdown?.value) {
|
||||
// Extract just the model name, not the unique ID
|
||||
const selectedId = modalDropdown.value;
|
||||
|
|
@ -284,7 +281,7 @@ export function getSelectedModel() {
|
|||
// Get max tokens for the currently selected model
|
||||
export function getSelectedModelMaxTokens() {
|
||||
// Check modal dropdown first
|
||||
const modalDropdown = document.getElementById("hermes-model-selection");
|
||||
const modalDropdown = document.getElementById("modal-model-selection");
|
||||
if (modalDropdown?.value && modelRegistry[modalDropdown.value]) {
|
||||
const modelData = modelRegistry[modalDropdown.value];
|
||||
return modelData.maxTokens || DEFAULT_MAX_TOKENS;
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ async function openUncloseaiEmbeddedModalNew() {
|
|||
|
||||
|
||||
const modelSelect = document.createElement("select");
|
||||
modelSelect.id = "hermes-model-selection";
|
||||
modelSelect.id = "modal-model-selection";
|
||||
modelSelect.className = "uncloseai-modal-select";
|
||||
|
||||
// Store models for selection handler
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue