[PR #1166] [MERGED] Mermaid front end rendering #22931

Closed
opened 2026-02-21 20:20:04 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify/pull/1166
Author: @charli117
Created: 9/12/2023
Status: Merged
Merged: 9/14/2023
Merged by: @crazywoola

Base: mainHead: mermaid-front-end-rendering


📝 Commits (9)

  • abbba75 mermaid front-end rendering
  • 925ded9 mermaid front-end rendering
  • 98723f7 add 'AI Graph Generator' application template
  • d84b1a3 universal Invalid parameter deletion
  • 2157564 add missing translation 、rendering logic And format optimization
  • 3da13c4 add markdown&makefile language map and modify mermaid style
  • 921c809 modify mermaid style
  • 8920cc4 modify mermaid style
  • 72b6d85 makefile spelling correction

📊 Changes

13 files changed (+916 additions, -208 deletions)

View changed files

📝 api/constants/model_template.py (+76 -0)
📝 api/controllers/console/universal_chat/chat.py (+0 -1)
📝 web/app/(commonLayout)/apps/NewAppDialog.tsx (+1 -1)
web/app/components/app/chat/mermaid/index.tsx (+100 -0)
web/app/components/app/chat/svg/index.tsx (+23 -0)
web/app/components/app/chat/svg/style.module.css (+11 -0)
📝 web/app/components/base/markdown.tsx (+39 -17)
web/app/components/develop/secret-key/assets/svg.svg (+1 -0)
web/app/components/develop/secret-key/assets/svged.svg (+1 -0)
📝 web/i18n/lang/app-api.en.ts (+75 -72)
📝 web/i18n/lang/app-api.zh.ts (+75 -72)
📝 web/package.json (+1 -0)
📝 web/yarn.lock (+513 -45)

📄 Description

当生成结果符合mermaid代码块格式要求时,显示SVG转换图标,点击转换图标可在代码块与SVG矢量图间相互切换


🔄 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/langgenius/dify/pull/1166 **Author:** [@charli117](https://github.com/charli117) **Created:** 9/12/2023 **Status:** ✅ Merged **Merged:** 9/14/2023 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `mermaid-front-end-rendering` --- ### 📝 Commits (9) - [`abbba75`](https://github.com/langgenius/dify/commit/abbba755393b9ee57398e9922db05a03927f1cb4) mermaid front-end rendering - [`925ded9`](https://github.com/langgenius/dify/commit/925ded92146e063fee9cf79934c99a00b4303c37) mermaid front-end rendering - [`98723f7`](https://github.com/langgenius/dify/commit/98723f7e247d1e0343f17dabefac366c9b68087c) add 'AI Graph Generator' application template - [`d84b1a3`](https://github.com/langgenius/dify/commit/d84b1a3eb92eff59f1ff8bc622fe8b207e9d097e) universal Invalid parameter deletion - [`2157564`](https://github.com/langgenius/dify/commit/21575646970e0d91698665400c8f5b124e425b18) add missing translation 、rendering logic And format optimization - [`3da13c4`](https://github.com/langgenius/dify/commit/3da13c4dffcadde49d14675425a96e7fd27f90a4) add markdown&makefile language map and modify mermaid style - [`921c809`](https://github.com/langgenius/dify/commit/921c80996bdd6c92abdf8041a9584f376e308ca6) modify mermaid style - [`8920cc4`](https://github.com/langgenius/dify/commit/8920cc4912a09b3266fc17385655344011303e9a) modify mermaid style - [`72b6d85`](https://github.com/langgenius/dify/commit/72b6d85f0808b1ee2ed883c0c815622bf0fd80c5) makefile spelling correction ### 📊 Changes **13 files changed** (+916 additions, -208 deletions) <details> <summary>View changed files</summary> 📝 `api/constants/model_template.py` (+76 -0) 📝 `api/controllers/console/universal_chat/chat.py` (+0 -1) 📝 `web/app/(commonLayout)/apps/NewAppDialog.tsx` (+1 -1) ➕ `web/app/components/app/chat/mermaid/index.tsx` (+100 -0) ➕ `web/app/components/app/chat/svg/index.tsx` (+23 -0) ➕ `web/app/components/app/chat/svg/style.module.css` (+11 -0) 📝 `web/app/components/base/markdown.tsx` (+39 -17) ➕ `web/app/components/develop/secret-key/assets/svg.svg` (+1 -0) ➕ `web/app/components/develop/secret-key/assets/svged.svg` (+1 -0) 📝 `web/i18n/lang/app-api.en.ts` (+75 -72) 📝 `web/i18n/lang/app-api.zh.ts` (+75 -72) 📝 `web/package.json` (+1 -0) 📝 `web/yarn.lock` (+513 -45) </details> ### 📄 Description 当生成结果符合mermaid代码块格式要求时,显示SVG转换图标,点击转换图标可在代码块与SVG矢量图间相互切换 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-21 20:20:04 -05:00
yindo closed this issue 2026-02-21 20:20:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22931