fix(ui): collapse thinking blocks by default for reasoning models - #4467
fix(ui): collapse thinking blocks by default for reasoning models#4467VedantMadane wants to merge 1 commit into
Conversation
Remove the `open` attribute from the ThinkBlock `<details>` element so that `<think>` content from reasoning models like DeepSeek R1 is collapsed by default. Users can still expand to view the thinking process by clicking the summary. Fixes TabbyML#3977 Signed-off-by: Vedant Madane <[email protected]>
|
Collapsing |
|
Thanks for the feedback. I agree that persisting the preference would be a great UX addition. However, to keep this PR atomic and minimal, I propose keeping it as a default-collapsed state for now. We can definitely explore persistence in a follow-up PR. |
Fixes #3977
Removes the \open\ attribute from the \ThinkBlock\ <details>\ element so that <think>\ content from reasoning models (DeepSeek R1, etc.) is collapsed by default. Users can still expand to view the full thinking process by clicking the summary.
Change
One-line change in ^[e/tabby-ui/components/message-markdown/index.tsx:
\\diff
Details
Details
\\
The existing <think>\ tag pipeline (CUSTOM_HTML_BLOCK_TAGS, formatCustomHTMLBlockTags, rehypeSanitize, ThinkBlock component) already handles parsing correctly. The only issue was the default visibility.