refac: note editor model selection

This commit is contained in:
Tim Jaeryang Baek 2025-07-13 04:53:27 +04:00
parent d4dfece4f9
commit bd44ab64d0
2 changed files with 4 additions and 8 deletions

View file

@ -778,6 +778,10 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
} }
} }
if (!selectedModelId) {
selectedModelId = $models.at(0)?.id || '';
}
const dropzoneElement = document.getElementById('note-editor'); const dropzoneElement = document.getElementById('note-editor');
dropzoneElement?.addEventListener('dragover', onDragOver); dropzoneElement?.addEventListener('dragover', onDragOver);

View file

@ -301,14 +301,6 @@ Based on the user's instruction, update and enhance the existing notes by incorp
await goto('/'); await goto('/');
} }
if ($settings?.models) {
selectedModelId = $settings?.models[0];
} else if ($config?.default_models) {
selectedModelId = $config?.default_models.split(',')[0];
} else {
selectedModelId = '';
}
editorEnabled = localStorage.getItem('noteEditorEnabled') === 'true'; editorEnabled = localStorage.getItem('noteEditorEnabled') === 'true';
loaded = true; loaded = true;