Skip to content

Update: update plugin to flow_map-0.0.4.difypkg【add new features】#2608

Merged
crazywoola merged 6 commits into
langgenius:mainfrom
sawyer-shi:main
Jul 1, 2026
Merged

Update: update plugin to flow_map-0.0.4.difypkg【add new features】#2608
crazywoola merged 6 commits into
langgenius:mainfrom
sawyer-shi:main

Conversation

@sawyer-shi

@sawyer-shi sawyer-shi commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Plugin Submission

Plugin information

FlowMap - Advanced Flowchart Generator Plugin for Dify

Author: sawyer-shi
Email: sawyer36@foxmail.com
Version: 0.0.4
Type: Dify Plugin
Repository: GitHub

Version Information

  • Current Version: v0.0.4
  • Release Date: 2026-06-21
  • Compatibility: Dify Plugin Framework
  • Python Version: 3.12+

Version History

  • v0.0.4 (2026-06-21): Added AI Flowchart tool with Dify LLM model selection, plain text to Mermaid generation, top-bottom/left-right/free layout selection, and optional Mermaid source download.
  • v0.0.3 (2026-03-15): Updated element overlap prevention algorithm to ensure elements do not cover each other.
  • v0.0.2 (2025-10-18): Added free layout flowchart functionality, fixed bugs from previous versions, improved software stability and reliability.
  • v0.0.1 (2025-09-12): Initial release with smart branch detection, colorful arrow labels, and advanced layout optimization

Description

A powerful flowchart generation plugin that converts Mermaid syntax or AI-summarized plain text to beautiful, intelligent flowcharts with advanced layout optimization and branch-aware positioning.

✨ Key Features

  • 🎨 Intelligent Layout System

    • Smart branch detection and free layout for complex flowcharts
    • Grid layout for linear processes
    • Automatic canvas sizing to prevent element overflow
  • 📐 Multiple Layout Directions

    • Left-to-right layout (LR)
    • Top-to-bottom layout (TB)
    • Branch-aware positioning
  • 🌈 Colorful Arrow Labels

    • Intelligent color mapping based on label semantics
    • Support for Chinese and English labels
    • Customizable color themes
  • 📝 Dual Format Support

    • Full Mermaid syntax support with labeled arrows
    • Markdown list conversion
    • Automatic text type detection
  • 🤖 AI Flowchart Generation

    • Select any available Dify LLM model directly in the tool
    • Convert plain text into clean Mermaid flowchart syntax
    • Choose top-bottom, left-right, or free layout output
    • Optionally download the AI-generated Mermaid source
  • 🎭 Rich Themes

    • Modern theme with gradient effects
    • Business professional theme
    • Classic minimalist theme
    • Custom theme support
  • 🔧 Local Processing

    • Local Generation: Flowcharts generated locally, no API Key required, no external network or services needed
    • Secure & Reliable: Data stays private, completely offline processing, protects user privacy
    • No external API dependencies
    • Fast generation with matplotlib
    • Privacy-focused design
    • High-quality PNG output

🚀 Quick Start

  1. Download from Dify Plugin Marketplace

    • Go to Dify Plugin Marketplace
    • Search and download flow_map plugin
    • Enable FlowMap plugin in your workspace
  2. AI Flowchart

    • Configure an available LLM model in Dify
    • Select the ai_flow_map / AI Flowchart tool
    • Choose the LLM model, paste plain text, and select the output layout
    • Run the tool to generate a PNG flowchart locally
  3. Manual LLM Integration

    • Add an LLM node in your Dify workflow
    • Use the simplest prompt: "Summarize user input #context# into Mermaid flowchart text format"
    • Connect LLM output to FlowMap plugin input

Basic Usage Examples

flow_map_en_a_01 flow_map_en_c_01

Top-to-bottom layout
flow_map_en_a_02
flow_map_en_c_03

Left-to-right layout
flow_map_en_a_03
flow_map_en_c_02

📚 API Reference

AI Flowchart Tool

Input Parameters:

  • model_config (model-selector, required): LLM model selected in Dify
  • text_content (string, required): Plain text to summarize into a flowchart
  • layout_mode (string, optional): top_bottom, left_right, or free
  • theme (string, optional): Theme name (modern/business/classic/tech/minimal)
  • filename (string, optional): Base filename for the downloadable Mermaid source
  • download_mermaid (boolean, optional): Output the AI-generated Mermaid file

Output:

  • Success: PNG image + text summary + JSON details
  • Optional: Mermaid source file when download_mermaid=true
  • JSON includes layout_mode, theme, and generated_mermaid

Mermaid Left-Right Tool

Input Parameters:

  • text (string, required): Mermaid syntax flowchart text
  • theme (string, optional): Theme name (modern/business/classic)

Output:

  • Success: PNG image + text summary
  • Format: "Successfully generated left-right layout flowchart. File size: X.XXM. Contains X nodes and X connections."

Mermaid Top-Bottom Tool

Input Parameters:

  • text (string, required): Mermaid syntax flowchart text
  • theme (string, optional): Theme name (modern/business/classic)

Output:

  • Success: PNG image + text summary
  • Format: "Successfully generated top-bottom layout flowchart. File size: X.XXM. Contains X nodes and X connections."

🛠️ Advanced Features

Smart Branch Detection

The plugin automatically detects branching scenarios in your flowchart and switches layout algorithms:

  • Linear Flow: Uses grid layout for optimal alignment
  • Branching Flow: Uses free layout to prevent overlap
  • Complex Flow: Automatically expands spacing and uses Bezier curve routing with orthogonal fallback to reduce line interference in dense free-layout diagrams

Colorful Arrow Labels

Supports labeled arrows with intelligent color mapping

Theme Customization

Available themes with different visual styles:

  • Modern: Clean design with gradients
  • Business: Professional corporate style
  • Classic: Traditional minimalist look

🔧 Development

Project Structure

flow_map/
├── tools/                  # Core tools implementation
│   ├── ai_flow_map.py      # AI text-to-flowchart tool
│   ├── mermaid_lr.py      # Left-right layout tool
│   ├── mermaid_tb.py      # Top-bottom layout tool
│   ├── mermaid_free.py    # Free layout tool
│   └── optimized_layout.py # Advanced layout engine
├── provider/              # Provider configurations
├── test/                  # Comprehensive tests
├── manifest.yaml          # Plugin manifest
├── main.py               # Entry point
└── README.md             # Documentation

🔍 Technical Details

Branch-Aware Layout Algorithm

  • Branch Detection: Automatically identifies decision nodes with multiple outgoing connections
  • Free Layout: Hierarchical positioning based on connection levels
  • Canvas Adaptation: Dynamic canvas sizing (up to 2.5x node count)
  • Collision Avoidance: Smart spacing with 70% effective area usage
  • Complex Routing: Dense free-layout flowcharts use Bezier curve fan-out, per-edge channel offsets, orthogonal fallback, canvas-bounded routing, and label collision avoidance

Performance Optimization

  • Matplotlib Backend: High-quality vector graphics
  • Memory Efficient: Local processing without external APIs
  • Fast Rendering: Optimized for complex flowcharts

Developer Information

License Notice

This project is licensed under the MIT License.


Ready to create beautiful flowcharts?

Submission type

  • New plugin
  • Version update

What changed

Risk level

  • Low risk
  • Medium risk
  • High risk

Required checks

  • I have read and followed the Marketplace submission requirements.
  • I have read and comply with the Plugin Developer Agreement.
  • I tested this plugin on Dify Community Edition and Dify Cloud, or documented any limitation below.
  • The package contains only files needed at runtime.
  • The package does not contain secrets, local credentials, .env files, .git directories, virtual environments, caches, logs, or IDE files.
  • The package does not contain executables or bundled binaries, or I explained why they are required below.
  • The plugin README includes setup steps, usage instructions, required APIs or credentials, connection requirements, and the source repository link.
  • The plugin includes PRIVACY.md or a hosted privacy policy, and manifest.yaml references it.
  • All user-facing text is primarily in English, with any localized README files following the i18n guidance.

Security and privacy notes

Local validation

Reviewer notes

@crazywoola crazywoola left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. The plugin pre-check did not pass yet. Please address the required fixes below.

Check Status Required action
Single .difypkg ✅ Pass None.
PR language ✅ Pass None.
Unpack package ✅ Pass None.
Project structure ✅ Pass None.
Manifest author ✅ Pass None.
Icon ✅ Pass None.
Version ✅ Pass None.
README language ✅ Pass None.
PRIVACY.md ✅ Pass None.
Dependencies ✅ Pass None.
dify_plugin version ✅ Pass None.
Install test ❌ Fail Make sure the plugin starts successfully with python3 -m main under the configured install method.
Packaging test ✅ Pass None.

Next steps

  • Make sure the plugin starts successfully with python3 -m main under the configured install method.

@sawyer-shi sawyer-shi left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please help to recheck, Thanks a lot! @crazywoola

@crazywoola crazywoola left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM

Decision: Approve

Local Check Results

Check Status Detail Required action
PR content language ✅ Pass PR title/body CJK ratio=0.0% (zh=0, en=6914, ignored_zh=0, allowed_zh<=0) None.
Project structure ✅ Pass All expected files present: manifest.yaml, README.md, PRIVACY.md. _assets/: yes. None.
Manifest author ✅ Pass author is valid. None.
Icon validation ✅ Pass icon exists: _assets/icon.png None.
Version check ✅ Pass version 0.0.4 is available. None.
README language ✅ Pass README.md CJK ratio=0.0% (zh=0, en=5415, allowed_zh<=0) None.
PRIVACY.md ✅ Pass PRIVACY.md exists and is non-empty. None.
Dependency install ✅ Pass requirements installed successfully. None.
dify_plugin version ✅ Pass dify_plugin version 0.9.1 satisfies >= 0.9.0. None.
Install test ✅ Pass plugin install test passed. None.
Packaging test ✅ Pass packaging check passed. None.

@crazywoola crazywoola merged commit 4524a55 into langgenius:main Jul 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants