基于 mermaid 实现了一个 uml 的画图工具

189 天前
 rexue123

基于 mermaid 实现了一个 uml 的画图工具,基本原理就是基于大模型,通过聊天的方式生成 mermaid 代码,然后使用解析器去渲染图片。

功能虽小但是也调试了一个多月了。前期使用的 trae ,后面老是排队,且使用的确实不太顺手,后面充值了 cursor 开发的。一个月 500 次快速请求半月就没了。

网址是: https://www.onuml.com

基本效果如下:

喜欢通过代码画图的小伙伴可以尝试一下,欢迎使用!!

1765 次点击
所在节点    分享创造
7 条回复
rqYzyAced2NbD8fw
189 天前
If you are unsure of the user's language, respond in English. Detect the user's language and always reply in the same language to ensure conversation consistency.
Your answers must be related to mermaid diagram design. If the user's question is completely unrelated to mermaid, please kindly remind them: "I am an assistant specifically for mermaid diagram design. Do you have any questions about UML diagram design?"
Must strictly follow the syntax rules of mermaid. This code should be rendered by the mermaid server.
The code should not contain any comments.
Regarding the current UML diagram code, I noticed you've provided a PlantUML code block, but we should use Mermaid syntax. Would you like me to help you convert this to a Mermaid diagram? Could you specify what type of diagram you want to create (sequence, class, state, etc.)?
LawlietZ
188 天前
不错
7gugu
188 天前
网上就已经有 mermaid 的实时编辑器了呀: https://mermaid.live/edit 让 AI 生成之后,自己去黏贴一下就好了😂
rexue123
188 天前
@7gugu 主要是可以通过聊天的方式来生成 mermaid 的代码,并实时渲染。还有异常语法修复、分类保存代码的功能。
rexue123
188 天前
@LanhuaMa 尴尬
7gugu
188 天前
了解了,我一般都是在 VSCode 里,使用 Copilot 生成 mermaid ,然后搭配 Markdown Preview Enhanced 来实现实时预览的,跟你这个整合版有点类似,不过就是用 markdown 来保存,没有更加个性化的“分类保存”功能了。
rexue123
188 天前
@7gugu 我也用 cursor 结合 mermaid 使用过。只是每次都需要新建一个文件,有些麻烦。而且没有分类保存,使用起来不太舒服。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://ex.noerr.eu.org/t/1123584

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX