[GH-ISSUE #2881] [Feature]: Allow thought boxes like with the Professor Mari chat #1464

Closed
opened 2026-10-21 05:35:55 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @dan0dandeleon11 on GitHub (Jun 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2881

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Sometimes reading the thoughts are fun, needing to click on a button every time is a hassle, I want a toggle to have the option available.

Two related issues with extended thinking (reasoning) data:

  1. Display: Thinking blocks are collapsed behind a button on every message by default. There's no option to auto-expand them, so reading model reasoning requires clicking the brain icon per message, every time. This is tedious when you're actively reviewing reasoning across a conversation.

  2. Persistence & Export: The chat only appears to retain thinking tokens for the most recent message. When exporting a chat, older messages have their thinking data stripped. For users who treat reasoning as valuable data (prompt engineering, behavior analysis, archival), this means the thinking context is lost permanently.

Proposed solution

Auto-expand toggle: A UI setting (e.g., in chat settings or app settings) to display thinking blocks expanded by default instead of collapsed. Something like autoExpandThinking: true/false.

Full thinking retention: Persist thinking data for ALL messages across the conversation, not just the latest. Include thinking blocks in chat exports (JSON/text) as an option, so they're preserved as part of the conversation record.

Alternatives considered

Alternatives considered
Manually clicking the brain button per message (current behavior — functional but tedious)
Copy-pasting thinking blocks manually before they're overwritten (not sustainable)
Using the Professor Mari workspace chat, which displays thinking inline by default — but this rendering pipeline isn't available in regular conversation/RP/game modes

Additional context

The server already streams thinking chunks via SSE events when showThoughts: true in the prompt preset. The data exists — it's a frontend display choice (useState(false) hardcoded in ChatMessage.tsx and ConversationMessage.tsx) and a data retention choice on the storage side. The Professor Mari chat shows that it's actually possible to show thinking for every message for reviewing past chats later.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • [] I DID NOT read this template and provide the requested details.
Originally created by @dan0dandeleon11 on GitHub (Jun 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2881 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? Sometimes reading the thoughts are fun, needing to click on a button every time is a hassle, I want a toggle to have the option available. Two related issues with extended thinking (reasoning) data: 1. Display: Thinking blocks are collapsed behind a button on every message by default. There's no option to auto-expand them, so reading model reasoning requires clicking the brain icon per message, every time. This is tedious when you're actively reviewing reasoning across a conversation. 2. Persistence & Export: The chat only appears to retain thinking tokens for the most recent message. When exporting a chat, older messages have their thinking data stripped. For users who treat reasoning as valuable data (prompt engineering, behavior analysis, archival), this means the thinking context is lost permanently. ## Proposed solution Auto-expand toggle: A UI setting (e.g., in chat settings or app settings) to display thinking blocks expanded by default instead of collapsed. Something like autoExpandThinking: true/false. Full thinking retention: Persist thinking data for ALL messages across the conversation, not just the latest. Include thinking blocks in chat exports (JSON/text) as an option, so they're preserved as part of the conversation record. ## Alternatives considered Alternatives considered Manually clicking the brain button per message (current behavior — functional but tedious) Copy-pasting thinking blocks manually before they're overwritten (not sustainable) Using the Professor Mari workspace chat, which displays thinking inline by default — but this rendering pipeline isn't available in regular conversation/RP/game modes ## Additional context The server already streams thinking chunks via SSE events when showThoughts: true in the prompt preset. The data exists — it's a frontend display choice (useState(false) hardcoded in ChatMessage.tsx and ConversationMessage.tsx) and a data retention choice on the storage side. The Professor Mari chat shows that it's actually possible to show thinking for every message for reviewing past chats later. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:35:55 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jun 27, 2026):

  1. Intended.
  2. Will make it so thinking gets exported.
<!-- gh-comment-id:4816386185 --> @SpicyMarinara commented on GitHub (Jun 27, 2026): 1. Intended. 2. Will make it so thinking gets exported.
Author
Owner

@SpicyMarinara commented on GitHub (Jun 27, 2026):

Implemented the export side of this per Mari's comment.

What changed:

  • Text chat exports now include a [Thinking] block when a message has stored reasoning/thinking.
  • JSONL exports now preserve the existing extra.thinking data and mirror it to top-level thinking/reasoning/reasoning_content fields for clearer archival compatibility.
  • JSONL import now restores top-level thinking/reasoning/reasoning_content into message extra.thinking when present.

Kept as-is:

  • Thought boxes remain collapsed by default; Mari marked that display behavior as intended.

Validation:

  • pnpm --filter @marinara-engine/server lint
  • git diff --check
<!-- gh-comment-id:4816494395 --> @SpicyMarinara commented on GitHub (Jun 27, 2026): Implemented the export side of this per Mari's comment. What changed: - Text chat exports now include a [Thinking] block when a message has stored reasoning/thinking. - JSONL exports now preserve the existing extra.thinking data and mirror it to top-level thinking/reasoning/reasoning_content fields for clearer archival compatibility. - JSONL import now restores top-level thinking/reasoning/reasoning_content into message extra.thinking when present. Kept as-is: - Thought boxes remain collapsed by default; Mari marked that display behavior as intended. Validation: - pnpm --filter @marinara-engine/server lint - git diff --check
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1464
No description provided.