mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 12:58:11 -05:00
[PR #20297] [CLOSED] feat: enhance LLM context with reactions and quoted messages #41179
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/20297
Author: @silentoplayz
Created: 12/31/2025
Status: ❌ Closed
Base:
dev← Head:feat/llm-reaction-context-clean📝 Commits (1)
4124550feat: enhance LLM context with reactions and quoted messages📊 Changes
2 files changed (+43 additions, -2 deletions)
View changed files
📝
backend/open_webui/routers/channels.py(+41 -2)📝
src/lib/components/common/RichTextInput.svelte(+2 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.
This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch will lead to immediate closure of the PR.Changelog Entry
Description
This PR enhances the LLM's context awareness in channel chats by injecting current emoji reactions and ensuring quoted/replied messages are always included in the history. It also fixes a
RangeErrorinRichTextInput.svelte.Key Changes:
[CURRENT REACTIONS: ...]tags for messages, allowing it to "see" and respond to user reactions (e.g., upvotes, custom emojis). A system prompt update instructs the model to prioritize these tags over text content.RangeErrorinRichTextInput.sveltecaused by accessing depth on a root node.Added
[CURRENT REACTIONS: ...]tags.parent_id(thread root) andreply_to_id(quoted message) in thethread_messageslist.Changed
model_response_handlerinbackend/open_webui/routers/channels.pyto process reactions and manage message history more robustly.Fixed
RichTextInput.svelte: Added a checkif ($from.depth === 0) return false;to prevent errors when querying node depth.Additional Information
Screenshots
See https://github.com/open-webui/open-webui/pull/20175 (closed PR) for screenshots, as that PR was originally opened up containing 3 out of the 4 commits also included in this PR.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.