mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-03 15:27:37 -05:00
[GH-ISSUE #652] Feat: delete parts of conversation. #66766
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
@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.
@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!
@dannyl1u commented on GitHub (Feb 18, 2024):
Sounds good, @tjbck is it okay if I push my changes to the
delete-messagebranch or should I make a separate branch for the PR?@tjbck commented on GitHub (Feb 18, 2024):
@dannyl1u whatever is the most convenient for you!
@dannyl1u commented on GitHub (Feb 21, 2024):
@tjbck published my PR, please review when you get the chance, thank you!
@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.