mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-30 17:25:30 -05:00
[GH-ISSUE #16745] issue: Copy button in code blocks copies the original AI output instead of the edited content #88770
Reference in New Issue
Block a user
Originally created by @yuliang615 on GitHub (Aug 20, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16745
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.22 dev
Ollama Version (if applicable)
No response
Operating System
macos
Browser (if applicable)
chrome
Confirmation
README.md.Expected Behavior
The "copy" button should copy the currently visible / edited content from the code block, not only the original AI output.
Actual Behavior
The button ignores user modifications and always returns the original AI output.
Steps to Reproduce
Ask the AI to generate a code block.
Manually edit the code inside the displayed code block within the UI.
Try copying the edited content using:
Option A: Select text with the mouse and copy or use ctrl+c command+c → Copies the edited content.
Option B: Click the "copy" button at the top-right corner of the code block → Copies only the original AI output.
Logs & Screenshots
Additional Information
No response
@yuliang615 commented on GitHub (Aug 23, 2025):
Fix in https://github.com/open-webui/open-webui/pull/16853