Repository navigation
Description
Description
When using reasoning/thinking models in Unsloth Studio / Unsloth Desktop, the Thinking output is currently rendered directly into the main chat flow while it is streaming.
For long reasoning traces, this causes the entire chat window to grow continuously and keep scrolling downward. This makes it difficult to keep context, read previous messages, or follow the final answer cleanly.
Proposed behavior
Render the Thinking / Reasoning output inside a dedicated, fixed-height container within the assistant message.
The container should:
- have its own internal scrollbar
- auto-scroll inside the Thinking container while new reasoning tokens are streaming
- avoid continuously scrolling the entire chat window downward
- be compact/collapsed by default once appropriate
- provide an obvious Expand / Show full thinking control
- allow the user to open the complete Thinking block whenever they want
- allow the expanded view to be collapsed again
Conceptually:
Assistant
┌─────────────────────────────────────┐
│ Thinking... │
│ │
│ reasoning tokens continue here... │
│ │
│ ↕ scroll │
└─────────────────────────────────────┘
[Show full thinking]
Final answer starts here...
Why this would help
Reasoning-capable models can generate very long Thinking traces. Keeping those traces inline at full height makes conversations unnecessarily difficult to navigate, especially during long generations.
A contained Thinking panel would:
- keep the main conversation much more readable
- prevent long reasoning traces from dominating the viewport
- make the final answer easier to find
- still preserve full access to the reasoning output for users who want to inspect it
Suggested UX details
- Use a reasonable fixed/max height for the Thinking panel during streaming.
- New reasoning tokens should follow the bottom inside that panel, not force the whole page to follow them.
- If the user manually scrolls upward inside the Thinking panel, auto-follow should ideally stop until they return to the bottom.
- After Thinking is finished, the panel could remain compact with a control such as:
Show full thinkingExpand thinking
- The full Thinking content should remain accessible without truncation.
Expected result
Long Thinking outputs stay visually contained, while the main chat remains stable and easy to navigate. Users who want the complete reasoning trace can still expand it on demand.
This would be especially useful in Unsloth Desktop / Studio with local reasoning models that may produce thousands of Thinking tokens.
Activity
feat(studio): bound streamed thinking output (unslothai#11703)