Skip to content

fix(ui): collapse thinking blocks by default for reasoning models#4467

Open
VedantMadane wants to merge 1 commit intoTabbyML:mainfrom
VedantMadane:fix/collapse-think-block
Open

fix(ui): collapse thinking blocks by default for reasoning models#4467
VedantMadane wants to merge 1 commit intoTabbyML:mainfrom
VedantMadane:fix/collapse-think-block

Conversation

@VedantMadane
Copy link
Copy Markdown

@VedantMadane VedantMadane commented Mar 26, 2026

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.

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 <6527493+VedantMadane@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support serve model DeepSeek R1 and disable thinking process in Answer ouput

1 participant