dify/api/controllers/console
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
..
app refactor(vibe): extract workflow generation to dedicated module 2025-12-29 11:04:42 +08:00
auth chore: remove unused login call from activation flow (#30017) 2025-12-23 12:26:52 +08:00
billing refactor: part of remove all reqparser (#29847) 2025-12-25 19:57:07 +08:00
datasets fix: handle missing `credential_id` (#30051) 2025-12-24 11:21:51 +08:00
explore refactor: split changes for api/controllers/console/explore/message.py (#29890) 2025-12-26 11:02:12 +08:00
tag refactor: part of remove all reqparser (#29848) 2025-12-18 16:52:51 +08:00
workspace refactor: split changes for api/controllers/console/workspace/load_ba… (#29887) 2025-12-26 11:00:03 +08:00
__init__.py feat: introduce trigger functionality (#27644) 2025-11-12 17:59:37 +08:00
admin.py refactor: admin api using session factory (#29628) 2025-12-15 12:01:41 +08:00
apikey.py fix: Failed to load API definition (#28509) 2025-11-24 21:44:09 +09:00
error.py Restructure the File errors in controller (#23801) 2025-08-13 17:06:07 +08:00
extension.py refactor: split changes for api/controllers/console/extension.py (#29888) 2025-12-24 09:41:42 +08:00
feature.py api -> console_ns (#28246) 2025-11-24 10:04:11 +08:00
files.py Feat/support multimodal embedding (#29115) 2025-12-09 14:41:46 +08:00
init_validate.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
ping.py api -> console_ns (#28246) 2025-11-24 10:04:11 +08:00
remote_files.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
setup.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
spec.py refactor(router): apply ns.route style (#26339) 2025-09-28 13:37:06 +08:00
version.py refactor: port reqparse to Pydantic model (#28949) 2025-12-05 13:05:53 +09:00
wraps.py fix: Login secret text transmission (#29659) 2025-12-16 16:55:51 +08:00