dify/web/app/components/workflow
aqiu cd030d82e5 refactor(vibe): extract workflow generation to dedicated module
- Move workflow generation logic from LLMGenerator to WorkflowGenerator
  - Extract to api/core/workflow/generator/ with modular architecture
  - Implement Planner-Builder pattern for better separation of concerns
  - Add validation engine with rule-based error classification
  - Add node and edge repair utilities for auto-fixing common issues
  - Add deterministic Mermaid generator for consistent output

- Reorganize configuration and prompts
  - Move vibe_config/ to generator/config/
  - Move vibe_prompts.py to generator/prompts/ (split into multiple files)
  - Add builder_prompts.py and planner_prompts.py for new architecture

- Enhance frontend workflow handling
  - Use standard node initialization for proper node setup
  - Improve variable reference replacement with better error handling
  - Add model fallback logic for better compatibility
  - Handle end node outputs format (value_selector vs legacy format)
  - Ensure parameter-extractor nodes have required 'required' field

- Add comprehensive test coverage
  - Unit tests for mermaid generator, node repair, edge repair
  - Tests for validation engine and rule system
  - Tests for planner prompts formatting
  - Frontend tests for variable reference replacement

- Add max_fix_iterations parameter for validate-fix loop configuration

# Conflicts:
#	web/app/components/workflow/hooks/use-workflow-vibe.tsx
2025-12-29 11:04:42 +08:00
..
__tests__ chore: lint require and how to import react (#30041) 2025-12-23 18:02:10 +08:00
block-selector chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
constants chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
datasets-detail-store chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
header fix: fix custom tool content is not update (#30250) 2025-12-28 17:50:30 +08:00
help-line chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
hooks refactor(vibe): extract workflow generation to dedicated module 2025-12-29 11:04:42 +08:00
hooks-store chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
nodes refactor(vibe): modularize config and enhance workflow generation 2025-12-29 11:04:41 +08:00
note-node chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
operator chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
panel refactor(vibe): modularize config and enhance workflow generation 2025-12-29 11:04:41 +08:00
plugin-dependency chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
run chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
simple-node chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
store refactor(vibe): modularize config and enhance workflow generation 2025-12-29 11:04:41 +08:00
utils chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
variable-inspect chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
workflow-preview chore: lint require and how to import react (#30041) 2025-12-23 18:02:10 +08:00
block-icon.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
candidate-node-main.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
candidate-node.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
constants.ts feat: update Vibe panel to use new event handling and versioning for flowcharts 2025-12-29 10:42:22 +08:00
context.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
custom-connection-line.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
custom-edge-linear-gradient-render.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
custom-edge.tsx chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
dsl-export-confirm-modal.tsx chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
features.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
index.tsx feat: v1 2025-12-29 10:42:21 +08:00
node-contextmenu.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
panel-contextmenu.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
selection-contextmenu.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
shortcuts-name.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
style.css fix: ReactFlow background in dark theme (#20013) 2025-05-21 10:32:07 +08:00
syncing-data-modal.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
types.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
update-dsl-modal.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
workflow-history-store.tsx chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00