[PR #20559] [CLOSED] feat: add markdown rendering toggle for citations and file modals #25669

Closed
opened 2026-04-20 06:03:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20559
Author: @jannikstdl
Created: 1/10/2026
Status: Closed

Base: devHead: feature/markdown-rendering-toggle


📝 Commits (2)

  • 5c55dc4 feat: add markdown rendering toggle for citations and file modals
  • 46e5972 feat: add snippet count badge to citation modal header

📊 Changes

7 files changed (+76 additions, -8 deletions)

View changed files

📝 backend/open_webui/config.py (+6 -0)
📝 backend/open_webui/main.py (+3 -0)
📝 backend/open_webui/routers/retrieval.py (+12 -0)
📝 src/lib/components/admin/Settings/Documents.svelte (+16 -0)
📝 src/lib/components/chat/Messages/Citations/CitationModal.svelte (+15 -2)
📝 src/lib/components/common/FileItemModal.svelte (+23 -6)
📝 src/lib/stores/index.ts (+1 -0)

📄 Description

Description:

Adds admin toggle to enable markdown rendering in citations and file preview modals with enhanced styling.

Features:

  • Toggle in Documents settings (under "Markdown Header Text Splitter")
  • Conditional markdown rendering in CitationModal and FileItemModal
  • Styled containers with controlled typography (smaller headings, better spacing)
  • Snippet count badge in citation modal header
  • Default: disabled (backward compatible)

Technical:

  • Backend: ENABLE_MARKDOWN_RENDERING config in retrieval.py, main.py, config.py
  • Frontend: Updates to CitationModal.svelte, FileItemModal.svelte, stores/index.ts

Screenshots or Videos

  • FileItemModal
    image

  • CitationsModal
    image

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.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 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/20559 **Author:** [@jannikstdl](https://github.com/jannikstdl) **Created:** 1/10/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feature/markdown-rendering-toggle` --- ### 📝 Commits (2) - [`5c55dc4`](https://github.com/open-webui/open-webui/commit/5c55dc42a23d40ffb51276308a827f404b25aa52) feat: add markdown rendering toggle for citations and file modals - [`46e5972`](https://github.com/open-webui/open-webui/commit/46e5972149c3778fb79ff7f161e999f042daea3f) feat: add snippet count badge to citation modal header ### 📊 Changes **7 files changed** (+76 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+6 -0) 📝 `backend/open_webui/main.py` (+3 -0) 📝 `backend/open_webui/routers/retrieval.py` (+12 -0) 📝 `src/lib/components/admin/Settings/Documents.svelte` (+16 -0) 📝 `src/lib/components/chat/Messages/Citations/CitationModal.svelte` (+15 -2) 📝 `src/lib/components/common/FileItemModal.svelte` (+23 -6) 📝 `src/lib/stores/index.ts` (+1 -0) </details> ### 📄 Description ### Description: Adds admin toggle to enable markdown rendering in citations and file preview modals with enhanced styling. ## Features: - Toggle in Documents settings (under "Markdown Header Text Splitter") - Conditional markdown rendering in CitationModal and FileItemModal - Styled containers with controlled typography (smaller headings, better spacing) - Snippet count badge in citation modal header - Default: disabled (backward compatible) ## Technical: - Backend: ENABLE_MARKDOWN_RENDERING config in retrieval.py, main.py, config.py - Frontend: Updates to CitationModal.svelte, FileItemModal.svelte, stores/index.ts ### Screenshots or Videos - FileItemModal <img width="927" height="524" alt="image" src="https://github.com/user-attachments/assets/9adcba2e-cf1a-4be6-a025-cc9855fce114" /> - CitationsModal <img width="947" height="458" alt="image" src="https://github.com/user-attachments/assets/2a362766-1577-4912-8c7a-f8b2cab778e2" /> ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <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 2026-04-20 06:03:57 -05: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#25669