[PR #7438] [CLOSED] Feature o1 thought #8854

Closed
opened 2025-11-11 18:07:55 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/7438
Author: @seshuthota
Created: 11/27/2024
Status: Closed

Base: devHead: feature-o1-thought


📝 Commits (2)

  • 0a26c41 Merge pull request #7399 from open-webui/dev
  • 23c59dd Functionality to support the thought response

📊 Changes

5 files changed (+317 additions, -70 deletions)

View changed files

📝 package-lock.json (+97 -24)
📝 package.json (+3 -1)
📝 src/lib/components/chat/Messages/ContentRenderer.svelte (+162 -45)
src/lib/components/chat/Messages/ThoughtOutput.svelte (+46 -0)
📝 src/tailwind.css (+9 -0)

📄 Description

Pull Request Title

fix: Resolve duplicate content rendering in chat messages

Description

This PR fixes an issue where chat messages containing <Thought> and <Output> tags were being rendered multiple times in the UI. The changes improve the content parsing logic and ensure single rendering of message content.

Changelog Entry

Description

Fixed a bug in the chat message rendering system where special tag content was being duplicated in the UI. This improves the readability and correctness of chat messages containing thought processes and outputs.

Added

  • Added safety checks for content parsing
  • Added debug logging for content flow tracking

Changed

  • Updated parseSpecialTags function to handle edge cases
  • Improved content rendering logic in ContentRenderer.svelte

Fixed

  • Fixed content parsing when special tags are missing

Code Changes

src/lib/components/chat/Messages/ContentRenderer.svelte

Testing

  • Tested with various message formats:
    • Plain text messages
    • Messages with only <Thought> tags
    • Messages with both <Thought> and <Output> tags
    • Empty messages
    • Messages with malformed tags

Additional Information

  • Related to chat message rendering improvements

##Screenshot of changes
Collapsed thought tag
image
Expanded thought tag
image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/7438 **Author:** [@seshuthota](https://github.com/seshuthota) **Created:** 11/27/2024 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feature-o1-thought` --- ### 📝 Commits (2) - [`0a26c41`](https://github.com/open-webui/open-webui/commit/0a26c41c7b58300f37348ba580a4f0d682ca5fbd) Merge pull request #7399 from open-webui/dev - [`23c59dd`](https://github.com/open-webui/open-webui/commit/23c59ddc059cd647a90b04e841bac3480a2ac77b) Functionality to support the thought response ### 📊 Changes **5 files changed** (+317 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+97 -24) 📝 `package.json` (+3 -1) 📝 `src/lib/components/chat/Messages/ContentRenderer.svelte` (+162 -45) ➕ `src/lib/components/chat/Messages/ThoughtOutput.svelte` (+46 -0) 📝 `src/tailwind.css` (+9 -0) </details> ### 📄 Description # Pull Request Title fix: Resolve duplicate content rendering in chat messages # Description This PR fixes an issue where chat messages containing `<Thought>` and `<Output>` tags were being rendered multiple times in the UI. The changes improve the content parsing logic and ensure single rendering of message content. # Changelog Entry ### Description Fixed a bug in the chat message rendering system where special tag content was being duplicated in the UI. This improves the readability and correctness of chat messages containing thought processes and outputs. ### Added - Added safety checks for content parsing - Added debug logging for content flow tracking ### Changed - Updated `parseSpecialTags` function to handle edge cases - Improved content rendering logic in ContentRenderer.svelte ### Fixed - Fixed content parsing when special tags are missing ### Code Changes src/lib/components/chat/Messages/ContentRenderer.svelte ### Testing - Tested with various message formats: - Plain text messages - Messages with only `<Thought>` tags - Messages with both `<Thought>` and `<Output>` tags - Empty messages - Messages with malformed tags ### Additional Information - Related to chat message rendering improvements ##Screenshot of changes Collapsed thought tag ![image](https://github.com/user-attachments/assets/3489d6cf-14b5-40db-945c-e0fa9895e7df) Expanded thought tag ![image](https://github.com/user-attachments/assets/a8e89ecd-251a-48b4-a685-5012c62ddb68) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 18:07:55 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#8854