V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
rexue123
V2EX  ›  分享创造

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

  •  
  •   rexue123 · 70 天前 · 1529 次点击
    这是一个创建于 70 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

    基本效果如下:

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

    7 条回复    2025-04-07 16:17:15 +08:00
    rqYzyAced2NbD8fw
        1
    rqYzyAced2NbD8fw  
       70 天前
    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
        2
    LawlietZ  
       70 天前
    不错
    7gugu
        3
    7gugu  
       70 天前
    网上就已经有 mermaid 的实时编辑器了呀: https://mermaid.live/edit 让 AI 生成之后,自己去黏贴一下就好了😂
    rexue123
        4
    rexue123  
    OP
       70 天前
    @7gugu 主要是可以通过聊天的方式来生成 mermaid 的代码,并实时渲染。还有异常语法修复、分类保存代码的功能。
    rexue123
        5
    rexue123  
    OP
       70 天前
    @LanhuaMa 尴尬
    7gugu
        6
    7gugu  
       70 天前
    了解了,我一般都是在 VSCode 里,使用 Copilot 生成 mermaid ,然后搭配 Markdown Preview Enhanced 来实现实时预览的,跟你这个整合版有点类似,不过就是用 markdown 来保存,没有更加个性化的“分类保存”功能了。
    rexue123
        7
    rexue123  
    OP
       70 天前
    @7gugu 我也用 cursor 结合 mermaid 使用过。只是每次都需要新建一个文件,有些麻烦。而且没有分类保存,使用起来不太舒服。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4668 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 09:51 · PVG 17:51 · LAX 02:51 · JFK 05:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.