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 a streaming thought in full instead of its last four lines
Elian Doran8505d00cbed0
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.css b/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.cssindex c4209ff30f..59f6fa7252 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.css+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.css@@ -239,19 +239,6 @@ body.background-effects.theme-supports-background-effects .llm-chat-message-userwhite-space: nowrap;}-/* Aligning the content to the end clips the overflow at the top, keeping the newest lines in view. */-.llm-chat-thinking-live .llm-chat-thinking-content {- display: flex;- flex-direction: column;- justify-content: flex-end;- max-height: calc(4 * 1.6em);- overflow: hidden;-- > * {- flex-shrink: 0;- }-}-/* The text after the last thought or tool call, set apart from the steps that led to it. */.llm-chat-reply {margin-top: 1rem;diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.tsxindex 712be9e412..964d5ab895 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.tsx+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatMessage.tsx@@ -126,8 +126,7 @@ function CitationsSection({ citations }: { citations: LlmCitation[] }) {/*** One stretch of the model's reasoning. A finished one folds to a single muted line: its leading* `**Title**` (the shape of Codex's reasoning summaries), or else its first line, which the body- * then leaves out. The one being generated stays open, clamped to its last lines under a spinner- * and its latest title.+ * then leaves out. The one being generated stays open in full under a spinner and its latest title.*/function ThinkingCard({ content, isLive }: { content: string; isLive?: boolean }) {if (isLive) {diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/AI.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/AI.htmlindex 6e9fa9d75e..8a67175809 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/AI.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/AI.html@@ -120,8 +120,9 @@ class="admonition note">search providers such as Exa, Tavily & SearXNG are not yet supported.</p></aside><h3>Thinking</h3>-<p>Some models reason before they answer. Their reasoning appears above the- reply as a collapsible <em>Thought process</em> line.</p>+<p>Some models reason before they answer. While the model is thinking, its+ reasoning is shown in full under a spinner; once it is done, it folds into+ a collapsible <em>Thought process</em> line above the reply.</p><p>How much a model thinks is set per chat, in one of two ways dependingon the model:</p><ul>diff --git a/docs/User Guide/User Guide/AI.md b/docs/User Guide/User Guide/AI.mdindex 7709b2b567..25f4057841 100644--- a/docs/User Guide/User Guide/AI.md+++ b/docs/User Guide/User Guide/AI.md@@ -92,7 +92,7 @@ This feature is on by default but it can easily be disabled by clicking on the m### Thinking-Some models reason before they answer. Their reasoning appears above the reply as a collapsible _Thought process_ line.+Some models reason before they answer. While the model is thinking, its reasoning is shown in full under a spinner; once it is done, it folds into a collapsible _Thought process_ line above the reply.How much a model thinks is set per chat, in one of two ways depending on the model: