[PR #18068] [MERGED] UPD: Add Validators & Error Toast for Mermaid & Vega diagrams #40291

Closed
opened 2026-04-25 12:41:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/18068
Author: @rgaricano
Created: 10/5/2025
Status: Merged
Merged: 10/6/2025
Merged by: @tjbck

Base: devHead: dev-FEAT_Vega_Visualizer


📝 Commits (4)

  • 2e08bda UPD: Add Validators & Error Toast for Mermaid & Vega diagrams
  • e6cc7db Fix Code Format
  • 8538d1b UPD: Add Validators & Error Toast for Mermaid & Vega diagrams
  • fa2534a Removed unused toast import & Code Format

📊 Changes

2 files changed (+37 additions, -33 deletions)

View changed files

📝 src/lib/components/chat/Messages/CodeBlock.svelte (+16 -2)
📝 src/lib/utils/index.ts (+21 -31)

📄 Description

UPD: Feat: Add Validators & Error Toast for Mermaid & Vega diagrams

Description:
As many time the diagrams generated or entered have syntax errors the diagrams are not rendered due to that errors, but as there isn't any notification is difficult to know what happend.

This PR add validator and toast notification when error on Mermaid and Vega/Vega-Lite diagrams, helping the user to fix its.

Note:
Another possibility of integrating Vega Graph Visualizer is through its svelte component: https://github.com/vega/svelte-vega/tree/main/packages/svelte-vega


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.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/18068 **Author:** [@rgaricano](https://github.com/rgaricano) **Created:** 10/5/2025 **Status:** ✅ Merged **Merged:** 10/6/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `dev-FEAT_Vega_Visualizer` --- ### 📝 Commits (4) - [`2e08bda`](https://github.com/open-webui/open-webui/commit/2e08bda19d12f79a0e7ded8733552c14665035a3) UPD: Add Validators & Error Toast for Mermaid & Vega diagrams - [`e6cc7db`](https://github.com/open-webui/open-webui/commit/e6cc7db3c1a3788ed55b41229b0db7306000fe6c) Fix Code Format - [`8538d1b`](https://github.com/open-webui/open-webui/commit/8538d1b2cb21144df7f4504a9354f77dee14b7f1) UPD: Add Validators & Error Toast for Mermaid & Vega diagrams - [`fa2534a`](https://github.com/open-webui/open-webui/commit/fa2534a52996c8ce229bda4de9f512112bd4f2bf) Removed unused toast import & Code Format ### 📊 Changes **2 files changed** (+37 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Messages/CodeBlock.svelte` (+16 -2) 📝 `src/lib/utils/index.ts` (+21 -31) </details> ### 📄 Description ### UPD: Feat: Add Validators & Error Toast for Mermaid & Vega diagrams **Description:** As many time the diagrams generated or entered have syntax errors the diagrams are not rendered due to that errors, but as there isn't any notification is difficult to know what happend. This PR add validator and toast notification when error on Mermaid and Vega/Vega-Lite diagrams, helping the user to fix its. **Note:** Another possibility of integrating Vega Graph Visualizer is through its svelte component: https://github.com/vega/svelte-vega/tree/main/packages/svelte-vega ____ ### 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. --- <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-25 12:41:34 -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#40291