[GH-ISSUE #652] Feat: delete parts of conversation. #99157

Closed
opened 2026-05-17 20:58:50 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @sanyi on GitHub (Feb 5, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/652

I often face a situation when a discussion diverges because a prompt mistake or necessity of some side questions. This adds unneeded parts to the context that I would rather remove.

A simple delete X button that would remove a chat bauble all together. I am not sure if would make sense to delete entries in pairs (as prompt and response) or separately.

I think this would greatly help users maintain a shorter and clean context, to avoid context fading, but also for archiving purposes.

Originally created by @sanyi on GitHub (Feb 5, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/652 I often face a situation when a discussion diverges because a prompt mistake or necessity of some side questions. This adds unneeded parts to the context that I would rather remove. A simple delete X button that would remove a chat bauble all together. I am not sure if would make sense to delete entries in pairs (as prompt and response) or separately. I think this would greatly help users maintain a shorter and clean context, to avoid context fading, but also for archiving purposes.
Author
Owner

@dannyl1u commented on GitHub (Feb 18, 2024):

+1 I agree this would be a useful feature to keep a clean conversation history and avoid having side questions, clarifications, etc. affect the context.

One solution would be to add a deletion button (🗑️) directly into each message's toolbar. This way, when a message is deleted by a user, it would be permanently removed from both the DOM as well as the message history payload in subsequent requests.

However, this could disrupt the conversational context. Specifically, deleting messages from earlier in the conversation could lead to a loss of continuity and make subsequent interactions less coherent. Perhaps we should only allow deletion of the most recent sent message/response?

I'm happy to work on this, @tjbck let me know if you have any thoughts.

<!-- gh-comment-id:1951456017 --> @dannyl1u commented on GitHub (Feb 18, 2024): +1 I agree this would be a useful feature to keep a clean conversation history and avoid having side questions, clarifications, etc. affect the context. One solution would be to add a deletion button (🗑️) directly into each message's toolbar. This way, when a message is deleted by a user, it would be permanently removed from both the DOM as well as the message history payload in subsequent requests. However, this could disrupt the conversational context. Specifically, deleting messages from earlier in the conversation could lead to a loss of continuity and make subsequent interactions less coherent. Perhaps we should only allow deletion of the most recent sent message/response? I'm happy to work on this, @tjbck let me know if you have any thoughts.
Author
Owner

@tjbck commented on GitHub (Feb 18, 2024):

@dannyl1u A sensible approach would be only allowing users to remove subsequent messages after the first prompt and removing both user message and response as a pair, ideally we would also want to retain the deleted messages in the history object as well. Just added a button to https://github.com/open-webui/open-webui/tree/delete-message branch, feel free to make a PR!

<!-- gh-comment-id:1951474779 --> @tjbck commented on GitHub (Feb 18, 2024): @dannyl1u A sensible approach would be only allowing users to remove subsequent messages after the first prompt and removing both user message and response as a pair, ideally we would also want to retain the deleted messages in the history object as well. Just added a button to https://github.com/open-webui/open-webui/tree/delete-message branch, feel free to make a PR!
Author
Owner

@dannyl1u commented on GitHub (Feb 18, 2024):

Sounds good, @tjbck is it okay if I push my changes to the delete-message branch or should I make a separate branch for the PR?

<!-- gh-comment-id:1951478360 --> @dannyl1u commented on GitHub (Feb 18, 2024): Sounds good, @tjbck is it okay if I push my changes to the `delete-message` branch or should I make a separate branch for the PR?
Author
Owner

@tjbck commented on GitHub (Feb 18, 2024):

@dannyl1u whatever is the most convenient for you!

<!-- gh-comment-id:1951478651 --> @tjbck commented on GitHub (Feb 18, 2024): @dannyl1u whatever is the most convenient for you!
Author
Owner

@dannyl1u commented on GitHub (Feb 21, 2024):

@tjbck published my PR, please review when you get the chance, thank you!

<!-- gh-comment-id:1955603345 --> @dannyl1u commented on GitHub (Feb 21, 2024): @tjbck published my PR, please review when you get the chance, thank you!
Author
Owner

@Happ1ness-dev commented on GitHub (Feb 4, 2025):

Hello, is this feature still available? I can't find it on mobile for some reason.

It's really needed for me because I do a lot of experimenting, and ideally all messages should be deletable. Not just messages from the user or recent ones.

<!-- gh-comment-id:2634689463 --> @Happ1ness-dev commented on GitHub (Feb 4, 2025): Hello, is this feature still available? I can't find it on mobile for some reason. It's really needed for me because I do a lot of experimenting, and ideally all messages should be deletable. Not just messages from the user or recent ones.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#99157