mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
Fix(notes): Hide hidden models in notes section
This commit fixes a bug where hidden models were still visible and selectable in the notes section. The following changes were made: - The model dropdown in the chat section of the note editor is now filtered to exclude hidden models. - The default model selection logic in the note editor is now filtered to exclude hidden models.
This commit is contained in:
parent
b55a38ee97
commit
c32b407f8a
2 changed files with 3 additions and 2 deletions
|
|
@ -872,7 +872,8 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!selectedModelId) {
|
if (!selectedModelId) {
|
||||||
selectedModelId = $models.at(0)?.id || '';
|
selectedModelId =
|
||||||
|
$models.filter((model) => !(model?.info?.meta?.hidden ?? false)).at(0)?.id || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
const dropzoneElement = document.getElementById('note-editor');
|
const dropzoneElement = document.getElementById('note-editor');
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,7 @@ Based on the user's instruction, update and enhance the existing notes or select
|
||||||
class=" bg-transparent rounded-lg py-1 px-2 -mx-0.5 text-sm outline-hidden w-full text-right pr-5"
|
class=" bg-transparent rounded-lg py-1 px-2 -mx-0.5 text-sm outline-hidden w-full text-right pr-5"
|
||||||
bind:value={selectedModelId}
|
bind:value={selectedModelId}
|
||||||
>
|
>
|
||||||
{#each $models as model}
|
{#each $models.filter((model) => !(model?.info?.meta?.hidden ?? false)) as model}
|
||||||
<option value={model.id} class="bg-gray-50 dark:bg-gray-700"
|
<option value={model.id} class="bg-gray-50 dark:bg-gray-700"
|
||||||
>{model.name}</option
|
>{model.name}</option
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue