Browse Source

Merge pull request #17722 from Classic298/bugfix/hidden-models-in-notes

Fix: Hide hidden models in notes section
Tim Jaeryang Baek 5 months ago
parent
commit
1493a5fd32

+ 2 - 1
src/lib/components/notes/NoteEditor.svelte

@@ -872,7 +872,8 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
 		}
 
 		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');

+ 1 - 1
src/lib/components/notes/NoteEditor/Chat.svelte

@@ -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"
 									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"
 											>{model.name}</option
 										>