@@ -45,30 +45,6 @@ <h2 class="settings-title">⚙️ Configuration Settings</h2>
4545 <!-- Alert messages will be shown as floating notifications -->
4646
4747 < form id ="settings-form " class ="settings-form ">
48- <!-- Vector Search Settings -->
49- < section class ="settings-section ">
50- < h3 class ="section-title "> 🔍 Vector Search & Embeddings</ h3 >
51- < div class ="form-group ">
52- < label for ="enable-vector-search " class ="form-label ">
53- < input type ="checkbox " id ="enable-vector-search " name ="enable_vector_search " {{if .Config.EnableVectorSearch}}checked{{end}} >
54- Enable Vector Search
55- </ label >
56- < p class ="form-help "> Enable semantic search using vector embeddings for better note discovery</ p >
57- </ div >
58- < div class ="form-group ">
59- < label for ="embedding-model " class ="form-label "> Embedding Model</ label >
60- < input type ="text " id ="embedding-model " name ="embedding_model " class ="form-input "
61- value ="{{.Config.EmbeddingModel}} " placeholder ="e.g., nomic-embed-text ">
62- < p class ="form-help "> The model to use for generating text embeddings</ p >
63- </ div >
64- < div class ="form-group ">
65- < label for ="vector-dimensions " class ="form-label "> Vector Dimensions</ label >
66- < input type ="number " id ="vector-dimensions " name ="vector_dimensions " class ="form-input "
67- value ="{{.Config.VectorDimensions}} " min ="1 " max ="4096 " placeholder ="384 ">
68- < p class ="form-help "> Number of dimensions for vector embeddings (must match your model)</ p >
69- </ div >
70- </ section >
71-
7248 <!-- Ollama Settings -->
7349 < section class ="settings-section ">
7450 < h3 class ="section-title "> 🦙 Ollama Integration</ h3 >
@@ -80,6 +56,17 @@ <h3 class="section-title">🦙 Ollama Integration</h3>
8056 </ div >
8157 </ section >
8258
59+ <!-- Lil-Rag Settings -->
60+ < section class ="settings-section ">
61+ < h3 class ="section-title "> 🔍 Lil-Rag Integration</ h3 >
62+ < div class ="form-group ">
63+ < label for ="lilrag-url " class ="form-label "> Lil-Rag Service URL</ label >
64+ < input type ="url " id ="lilrag-url " name ="lilrag_url " class ="form-input "
65+ value ="{{.Config.LilRagURL}} " placeholder ="http://localhost:12121 ">
66+ < p class ="form-help "> URL of your Lil-Rag service for enhanced semantic search with project isolation</ p >
67+ </ div >
68+ </ section >
69+
8370 <!-- Summarization Settings -->
8471 < section class ="settings-section ">
8572 < h3 class ="section-title "> 📊 Summarization & Analysis</ h3 >
@@ -108,6 +95,12 @@ <h3 class="section-title">🏷️ Auto-tagging</h3>
10895 </ label >
10996 < p class ="form-help "> Automatically suggest and apply tags to notes using AI</ p >
11097 </ div >
98+ < div class ="form-group ">
99+ < label for ="auto-tag-model " class ="form-label "> Auto-tag Model</ label >
100+ < input type ="text " id ="auto-tag-model " name ="auto_tag_model " class ="form-input "
101+ value ="{{.Config.AutoTagModel}} " placeholder ="Leave empty to use summarization model ">
102+ < p class ="form-help "> The model to use for auto-tagging (leave empty to use summarization model)</ p >
103+ </ div >
111104 < div class ="form-group ">
112105 < label for ="max-auto-tags " class ="form-label "> Maximum Auto Tags</ label >
113106 < input type ="number " id ="max-auto-tags " name ="max_auto_tags " class ="form-input "
@@ -127,6 +120,19 @@ <h3 class="section-title">✏️ Editor Configuration</h3>
127120 </ div >
128121 </ section >
129122
123+ <!-- Web UI Settings -->
124+ < section class ="settings-section ">
125+ < h3 class ="section-title "> 🎨 Web UI Configuration</ h3 >
126+ < div class ="form-group ">
127+ < label for ="webui-theme " class ="form-label "> Default Theme</ label >
128+ < select id ="webui-theme " name ="webui_theme " class ="form-input ">
129+ < option value ="light " {{if eq .Config.WebUITheme "light"}}selected{{end}}> Light</ option >
130+ < option value ="dark " {{if eq .Config.WebUITheme "dark"}}selected{{end}}> Dark</ option >
131+ </ select >
132+ < p class ="form-help "> Default theme for the web interface</ p >
133+ </ div >
134+ </ section >
135+
130136 <!-- Update Settings -->
131137 < section class ="settings-section ">
132138 < h3 class ="section-title "> 🔄 Update Configuration</ h3 >
@@ -224,15 +230,15 @@ <h3 class="section-title">🔧 System Configuration</h3>
224230 for ( const [ key , value ] of formData . entries ( ) ) {
225231 if ( key . startsWith ( 'enable_' ) || key === 'debug' ) {
226232 settings [ key ] = true ; // Checkboxes are only included if checked
227- } else if ( key === 'vector_dimensions' || key === ' max_auto_tags') {
233+ } else if ( key === 'max_auto_tags' ) {
228234 settings [ key ] = parseInt ( value , 10 ) ;
229235 } else if ( value . trim ( ) !== '' ) {
230236 settings [ key ] = value . trim ( ) ;
231237 }
232238 }
233239
234240 // Handle unchecked checkboxes explicitly
235- const checkboxes = [ 'enable_vector_search' , ' enable_summarization', 'enable_auto_tagging' , 'debug' ] ;
241+ const checkboxes = [ 'enable_summarization' , 'enable_auto_tagging' , 'debug' ] ;
236242 checkboxes . forEach ( checkbox => {
237243 if ( ! ( checkbox in settings ) ) {
238244 settings [ checkbox ] = false ;
@@ -253,10 +259,6 @@ <h3 class="section-title">🔧 System Configuration</h3>
253259 if ( result . success ) {
254260 this . showNotification ( '✅ Settings saved successfully!' , 'success' ) ;
255261
256- if ( result . data . reindex_needed ) {
257- this . showNotification ( '⚠️ Vector configuration changed. Run "ml-notes reindex" to update embeddings.' , 'warning' ) ;
258- }
259-
260262 // Update form with returned values
261263 this . updateFormWithSettings ( result . data . settings ) ;
262264 } else {
@@ -276,17 +278,18 @@ <h3 class="section-title">🔧 System Configuration</h3>
276278 try {
277279 // Reset to default values by sending minimal configuration
278280 const defaultSettings = {
279- enable_vector_search : true ,
280281 enable_summarization : true ,
281282 enable_auto_tagging : true ,
282283 debug : false ,
283284 ollama_endpoint : 'http://localhost:11434' ,
284- embedding_model : 'nomic-embed-text' ,
285- vector_dimensions : 384 ,
285+ lilrag_url : 'http://localhost:12121' ,
286286 summarization_model : 'llama3.2:latest' ,
287+ auto_tag_model : '' ,
287288 max_auto_tags : 5 ,
289+ editor : '' ,
288290 github_owner : 'streed' ,
289- github_repo : 'ml-notes'
291+ github_repo : 'ml-notes' ,
292+ webui_theme : 'dark'
290293 } ;
291294
292295 const response = await fetch ( '/api/v1/settings' , {
0 commit comments