Skip to content

Conversation

@ServeurpersoCom
Copy link
Collaborator

@ServeurpersoCom ServeurpersoCom commented Dec 7, 2025

Make sure to read the contributing guidelines before submitting a PR

Description

This PR improves the copy functionality in the WebUI to handle messages with attachments (pasted content).

Changes

First commit: Enable copying text from pasted attachments when message content is empty

Second commit: Copy both prompt and all attachments separated by blank lines

Behavior

  • If a message has no prompt text but contains a pasted attachment, copying now retrieves the attachment content
  • If a message has both prompt text and attachments, copying concatenates them with newline separators in order: prompt first, then all attachments

Use case

Allows copying long prompts (converted to "pasted" attachments) from one chat to another, and properly handles messages with multiple attachments.

Video:

Copy-Pasted-Only-Prompt.mp4

Expected result:

Prompt\n
\n
Attach1\n
\n
Attach2\n
\n
...

Closes #17834

@ServeurpersoCom
Copy link
Collaborator Author

I'm going to make a video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: webui: copy prompt with the "pasted" attachment

1 participant