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
chore(llm): get rid of different chat bar for sidebar
Elian Doran37b370511f5b
diff --git a/apps/client/src/widgets/sidebar/SidebarChat.tsx b/apps/client/src/widgets/sidebar/SidebarChat.tsxindex d52a5cd07b..6d20438260 100644--- a/apps/client/src/widgets/sidebar/SidebarChat.tsx+++ b/apps/client/src/widgets/sidebar/SidebarChat.tsx@@ -296,7 +296,6 @@ export default function SidebarChat() {chat={chat}onSubmit={handleSubmit}onKeyDown={handleKeyDown}- compact/></div></RightPanelWidget>diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsxindex 555f48b8f1..5552a71251 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx@@ -29,8 +29,6 @@ interface ChatInputBarProps {showExtendedThinking?: boolean;/** Whether to show the context pie chart */showContextPie?: boolean;- /** Compact mode for sidebar */- compact?: boolean;}export default function ChatInputBar({@@ -43,8 +41,7 @@ export default function ChatInputBar({onModelChange,showModelSelector = false,showExtendedThinking = false,- showContextPie = false,- compact = false+ showContextPie = false}: ChatInputBarProps) {const handleSubmit = onSubmit ?? chat.handleSubmit;const handleKeyDown = onKeyDown ?? chat.handleKeyDown;@@ -69,54 +66,6 @@ export default function ChatInputBar({onModelChange?.(model);};- if (compact) {- return (- <div className="llm-chat-input-bar compact">- <textarea- ref={chat.textareaRef as RefObject<HTMLTextAreaElement>}- className="llm-chat-input"- value={chat.input}- onInput={(e) => chat.setInput((e.target as HTMLTextAreaElement).value)}- placeholder={t("llm_chat.placeholder")}- disabled={chat.isStreaming}- onKeyDown={handleKeyDown}- rows={2}- />- <div className="llm-chat-input-bar-actions">- <div className="llm-chat-input-bar-options">- <label className="llm-chat-toggle" title={t("llm_chat.web_search")}>- <input- type="checkbox"- checked={chat.enableWebSearch}- onChange={handleWebSearchToggle}- disabled={chat.isStreaming}- />- <span className="bx bx-globe" />- </label>- <label className="llm-chat-toggle" title={t("llm_chat.note_tools")}>- <input- type="checkbox"- checked={chat.enableNoteTools}- onChange={handleNoteToolsToggle}- disabled={chat.isStreaming}- />- <span className="bx bx-note" />- </label>- </div>- <button- type="button"- className="llm-chat-send-btn"- disabled={chat.isStreaming || !chat.input.trim()}- onClick={handleSubmit}- >- <span className="bx bx-send" />- </button>- </div>- </div>- );- }-- // Full mode for main LLM chatreturn (<form className="llm-chat-input-form" onSubmit={handleSubmit}><div className="llm-chat-input-row">diff --git a/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.css b/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.cssindex a72ce5f134..fb8ade6518 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.css+++ b/apps/client/src/widgets/type_widgets/llm_chat/LlmChat.css@@ -575,96 +575,3 @@cursor: help;flex-shrink: 0;}--/* Compact mode for sidebar */-.llm-chat-input-bar.compact {- padding: 0.5rem;- border-top: 1px solid var(--main-border-color);- display: flex;- flex-direction: column;- gap: 0.375rem;-}--.llm-chat-input-bar.compact .llm-chat-input {- width: 100%;- min-height: 50px;- max-height: 120px;- resize: vertical;- padding: 0.5rem;- border: 1px solid var(--main-border-color);- border-radius: 6px;- font-family: inherit;- font-size: 0.9rem;- background: var(--main-background-color);- color: var(--main-text-color);-}--.llm-chat-input-bar-actions {- display: flex;- align-items: center;- justify-content: space-between;- gap: 0.5rem;-}--.llm-chat-input-bar-options {- display: flex;- gap: 0.5rem;-}--.llm-chat-input-bar.compact .llm-chat-toggle {- display: flex;- align-items: center;- justify-content: center;- cursor: pointer;- color: var(--muted-text-color);- padding: 0.25rem;- gap: 0;- font-size: inherit;-}--.llm-chat-input-bar.compact .llm-chat-toggle input[type="checkbox"] {- display: none;-}--.llm-chat-input-bar.compact .llm-chat-toggle .bx {- font-size: 1.1rem;-}--.llm-chat-input-bar.compact .llm-chat-toggle:has(input:checked) {- color: var(--main-text-color);-}--.llm-chat-input-bar.compact .llm-chat-toggle:has(input:checked) .bx {- color: var(--main-selection-color);-}--.llm-chat-input-bar.compact .llm-chat-toggle:has(input:disabled) {- opacity: 0.5;- cursor: not-allowed;-}--.llm-chat-input-bar.compact .llm-chat-send-btn {- display: flex;- align-items: center;- justify-content: center;- padding: 0.5rem 0.75rem;- background: var(--button-background-color);- border: 1px solid var(--button-border-color);- border-radius: 6px;- cursor: pointer;- color: var(--button-text-color);- transition: background-color 0.15s ease;-}--.llm-chat-input-bar.compact .llm-chat-send-btn .bx {- font-size: 1rem;-}--.llm-chat-input-bar.compact .llm-chat-send-btn:hover:not(:disabled) {- background: var(--button-hover-background-color, var(--button-background-color));-}--.llm-chat-input-bar.compact .llm-chat-send-btn:disabled {- opacity: 0.5;- cursor: not-allowed;-}