[GH-ISSUE #5176] [BUG]: Copy action includes “Thinking Process” header text in clipboard even when response renders correctly #4954

Closed
opened 2026-06-05 14:51:06 -04:00 by yindo · 0 comments
Owner

Originally created by @raucodes on GitHub (Mar 9, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5176

Originally assigned to: @timothycarambat on GitHub.

How are you running AnythingLLM?

Docker (local)

What happened?

What happened?

When using the Copy action on a response from a reasoning model, the copied text includes the visible "Thinking Process" header text at the top.

The actual response rendering looks correct in the UI:

  • the reasoning / thinking section is separated into its own collapsible header
  • the final answer content is rendered below as expected

However, the clipboard content still contains the upper "Thinking Process: ..." header text.

Expected behavior

The Copy action should copy only the final answer content, or at minimum exclude the visible "Thinking Process" header text from the clipboard output.

Actual behavior

The response renders correctly, but copying the message appears to include text from the full message container instead of only the final-answer body.

Why this seems like a UI/copy issue

This does not appear to be a rendering issue, because the thinking section is visually separated correctly.

It looks more like the clipboard extraction is scoped incorrectly:

  • rendering is correct
  • copy behavior is not scoped to the final response body
  • the visible collapsible header text is included in the copied output

Possible cause

The copy action may be reading from the full message DOM/container instead of targeting only the final-answer content node.

Steps to reproduce

  1. Use a reasoning model that shows a collapsible Thinking Process section
  2. Generate a response
  3. Verify that the response renders correctly with the thinking block separated from the final answer
  4. Click Copy
  5. Paste the clipboard content somewhere else
  6. Observe that the copied text includes the "Thinking Process: ..." header text

Environment

  • AnythingLLM
  • Reasoning model with visible Thinking Process section
  • Clipboard issue reproducible from the response copy action

Additional note

The bug seems limited to the copy behavior.
The UI rendering itself appears correct.

Are there known steps to reproduce?

No response

Originally created by @raucodes on GitHub (Mar 9, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5176 Originally assigned to: @timothycarambat on GitHub. ### How are you running AnythingLLM? Docker (local) ### What happened? ### What happened? When using the **Copy** action on a response from a reasoning model, the copied text includes the visible **"Thinking Process"** header text at the top. The actual response rendering looks correct in the UI: - the reasoning / thinking section is separated into its own collapsible header - the final answer content is rendered below as expected However, the clipboard content still contains the upper "Thinking Process: ..." header text. ### Expected behavior The **Copy** action should copy only the final answer content, or at minimum exclude the visible "Thinking Process" header text from the clipboard output. ### Actual behavior The response renders correctly, but copying the message appears to include text from the full message container instead of only the final-answer body. ### Why this seems like a UI/copy issue This does **not** appear to be a rendering issue, because the thinking section is visually separated correctly. It looks more like the clipboard extraction is scoped incorrectly: - rendering is correct - copy behavior is not scoped to the final response body - the visible collapsible header text is included in the copied output ### Possible cause The copy action may be reading from the full message DOM/container instead of targeting only the final-answer content node. ### Steps to reproduce 1. Use a reasoning model that shows a collapsible **Thinking Process** section 2. Generate a response 3. Verify that the response renders correctly with the thinking block separated from the final answer 4. Click **Copy** 5. Paste the clipboard content somewhere else 6. Observe that the copied text includes the **"Thinking Process: ..."** header text ### Environment - AnythingLLM - Reasoning model with visible Thinking Process section - Clipboard issue reproducible from the response copy action ### Additional note The bug seems limited to the copy behavior. The UI rendering itself appears correct. ### Are there known steps to reproduce? _No response_
yindo added the UI/UXpossible bug labels 2026-06-05 14:51:06 -04:00
yindo closed this issue 2026-06-05 14:51:06 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4954