dify/api/controllers/console/app
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
..
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
advanced_prompt_template.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
agent.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
annotation.py fix: csv injection in annotations export (#29462) 2025-12-15 17:14:05 +08:00
app.py refactor: port reqparse to BaseModel (#28993) 2025-12-08 15:31:19 +09:00
app_import.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
audio.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
completion.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
conversation.py fix: remove chat conversation api dead arg message_count_gte (#29097) 2025-12-04 10:12:47 +08:00
conversation_variables.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
error.py Restructure the File errors in controller (#23801) 2025-08-13 17:06:07 +08:00
generator.py refactor(vibe): extract workflow generation to dedicated module 2025-12-29 11:04:42 +08:00
mcp_server.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
message.py fix: admin dislike feedback lose content (#29327) 2025-12-09 16:07:59 +08:00
model_config.py api -> console_ns (#28246) 2025-11-24 10:04:11 +08:00
ops_trace.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
site.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
statistic.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
workflow.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
workflow_app_log.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
workflow_draft_variable.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
workflow_run.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
workflow_statistic.py refactor: port reqparse to Pydantic model (#28913) 2025-11-30 16:09:42 +09:00
workflow_trigger.py fix: remove validate=True to fix flask-restx AttributeError (#29552) 2025-12-12 12:01:20 +08:00
wraps.py use deco to avoid current_user (#26077) 2025-10-16 15:45:51 +09:00