From 89976f656d34bbd8ec17bf8e1786ec76b39734bd Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 17 Apr 2026 09:02:13 +0200 Subject: [PATCH] Refactor GeneralSettings.jsx to organize settings by panel and improve UI structure --- src/GeneralSettings.jsx | 415 +++++++++++++++++++--------------------- 1 file changed, 198 insertions(+), 217 deletions(-) diff --git a/src/GeneralSettings.jsx b/src/GeneralSettings.jsx index bcb59e3..42f02ba 100644 --- a/src/GeneralSettings.jsx +++ b/src/GeneralSettings.jsx @@ -503,226 +503,207 @@ export default function GeneralSettings({ const rerankingModelOptions = buildSelectOptions(rerankingModels, rerankModel, 'saved model unavailable', showMissingModelLabel); const transcriptionModelOptions = buildSelectOptions(whisperModels, transcriptionModel, 'saved model unavailable', showMissingModelLabel); - return ( -
-
-

Heimgeist Backend URL

- -

Internal UI requests like chats, sessions, and databases go to this URL.

-
-
-

Ollama URL

- -

Heimgeist uses this URL to talk to Ollama for models and chat generation.

-
-
-

Embedding Model

- -

- Heimgeist uses this model for building or rebuilding local database embeddings. -

-
-
-

Reranking Model

- -

- Heimgeist currently uses an embedding-based reranker for web search, so this should generally be an embedding-capable Ollama model. -

-
-
-

Audio Input

- -

- Enables microphone transcription in the chat composer. Heimgeist records locally and sends the clip to the local Whisper runtime. -

- {audioInputEnabled && ( - <> -
- - - - -
- {audioInputStatus.message && ( -

{audioInputStatus.message}

- )} -

- Select the Whisper model Heimgeist should use for microphone transcription. -

-

- Whisper can auto-detect the spoken language, but you can force a fixed input language here when auto-detection drifts. -

- - )} -
-
-

Chat Model

- -

- Heimgeist uses this model for normal text chat. -

-
-
-

Vision Model

- -

- Heimgeist uses this model when a chat message includes image attachments. -

-
-
-

Stream Output

- -
-
-

Updates

-
-
- )} -
-
-

Purge Databases

-
- -
-

- Removes every local Heimgeist database, including staged files, corpora, and indexes. This is meant as a recovery action when the DB panel becomes unusable. Chat history stays intact. -

- {libraryPurgeStatus.message && ( -

- {libraryPurgeStatus.message} + {audioInputStatus.message && ( +

{audioInputStatus.message}

+ )} +

+ Microphone input is available in the chat composer. Heimgeist records locally and sends the clip to the configured Whisper model.

- )} +

+ Whisper can auto-detect the spoken language, but you can force a fixed input language here when auto-detection drifts. +

+
- - ); + ); + } + + if (panel === 'Updates') { + return ( +
+
+

Updates

+
+ +
+

+ Compares the local Git commit with remote master, pulls changes when needed, and restarts Heimgeist automatically. The same check also runs on every startup. +

+ {updateStatus.message && ( +

+ {updateStatus.message} +

+ )} + {(updateStatus.localCommit || updateStatus.remoteCommit || updateCheckedAtLabel) && ( +
+ {updateStatus.localCommit &&
Local: {shortCommit(updateStatus.localCommit)}
} + {updateStatus.remoteCommit &&
Remote: {shortCommit(updateStatus.remoteCommit)}
} + {updateCheckedAtLabel &&
Last checked: {updateCheckedAtLabel}
} +
+ )} +
+
+ ); + } + + if (panel === 'Advanced') { + return ( +
+
+

Purge Databases

+
+ +
+

+ Removes every local Heimgeist database, including staged files, corpora, and indexes. This is meant as a recovery action when the DB panel becomes unusable. Chat history stays intact. +

+ {libraryPurgeStatus.message && ( +

+ {libraryPurgeStatus.message} +

+ )} +
+
+ ); + } + + return null; }