Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(llm): show placeholder instead of blank box when no model selected
Elian Doran4951424d0856
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 3a05cbfd37..b0f7877839 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -2161,6 +2161,7 @@"extended_thinking": "Extended thinking","model_cost_included": "Subscription","no_models_selected": "No models selected — click the pencil to choose",+ "no_model_selected": "Select a model","edit_models": "Edit models","thinking": "Thinking...","thought_process": "Thought process",diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.css b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.cssindex b9c0964ce7..c6778e2cdc 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.css+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.css@@ -216,6 +216,10 @@cursor: not-allowed;}+.llm-chat-model-placeholder {+ color: var(--muted-text-color);+}+/* Note context toggle */.llm-chat-note-context.tn-low-profile {max-width: 150px;diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsxindex 6ce9b80305..e99be52641 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx@@ -369,7 +369,9 @@ export default function ChatInputBar({<div className="llm-chat-model-selector"><span className="bx bx-chip" /><Dropdown- text={<>{currentModel?.name}</>}+ text={currentModel+ ? <>{currentModel.name}</>+ : <span className="llm-chat-model-placeholder">{t("llm_chat.no_model_selected")}</span>}disabled={chat.isStreaming}buttonClassName="llm-chat-model-select"className="llm-chat-model-dropdown"