Commit Graph

700 Commits

Author SHA1 Message Date
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
aqiu c4eee28fd8 refactor(vibe): modularize config and enhance workflow generation
- Extract vibe configuration into dedicated module (api/core/llm_generator/vibe_config/)
  - node_schemas.py: Built-in node parameter definitions
  - fallback_rules.py: Keyword-based fallback rules and aliases
  - responses.py: Off-topic response templates
  - node_definitions.json: Shared schema for frontend/backend sync

- Enhance workflow generation with intent classification
  - Add off-topic detection with helpful suggestions
  - Support regeneration mode with previous workflow context
  - Add tool validation and sanitization
  - Support language preference for generated content

- Extract frontend config to use-workflow-vibe-config.ts
  - NODE_TYPE_ALIASES: Node type inference mapping
  - FIELD_NAME_CORRECTIONS: LLM output field corrections
  - correctFieldName(): Unified field correction helper

- Fix defensive null checks in variable utils and key-value list
- Change verbose debug logs from info to debug level
2025-12-29 11:04:41 +08:00
yyh e5a98b10a9 refactor: Replace goto-anything actions with a new scope registry system, simplifying command management and registration. 2025-12-29 10:42:24 +08:00
yyh 0f40afafe2 fix: sync vibe apply immediately 2025-12-29 10:42:24 +08:00
yyh de7d39d388 chore: test for vibe-panel 2025-12-29 10:42:24 +08:00
yyh aa37e8fa4c fix: prevent stale vibe preview on invalid flow 2025-12-29 10:42:23 +08:00
yyh cfb54a0e7d fix: enhance version management and validation in workflow hooks
- Updated `useVibeFlowData` to prevent adding empty graphs and ensure the current version is correctly derived from available versions.
- Improved error handling in `applyFlowchartToWorkflow` to notify users when the current flow graph is invalid.
- Added checks to only add valid workflow graphs to the versions list, enhancing data integrity.
2025-12-29 10:42:23 +08:00
yyh 8294759200 feat: add highPriority prop to VibePanel for improved rendering 2025-12-29 10:42:23 +08:00
WTW0313 99e5669a66 fix: ensure storageKey defaults to an empty string in Vibe panel and workflow hooks 2025-12-29 10:42:23 +08:00
WTW0313 4879795cb9 feat: update Vibe panel to use new event handling and versioning for flowcharts 2025-12-29 10:42:22 +08:00
crazywoola f2363fc458 feat: use new styles 2025-12-29 10:42:22 +08:00
WTW0313 0f69e2f6ab feat: implement Vibe panel for workflow with regeneration and acceptance features 2025-12-29 10:42:22 +08:00
crazywoola 9d496ed3dc feat: add MCP tools 2025-12-29 10:42:22 +08:00
crazywoola 5705fa898f feat: v1 2025-12-29 10:42:21 +08:00
crazywoola a5c6c8638e feat: v1 2025-12-29 10:42:21 +08:00
yyh 1e86535c4a
refactor(web): Migrate to Unified TanStack Devtools (#30279) 2025-12-29 09:43:44 +08:00
wangxiaolei bf56c2e9db
fix: fix custom tool content is not update (#30250) 2025-12-28 17:50:30 +08:00
wangxiaolei b892906d71
fix: fix metadata filter not survive a rename (#30174) 2025-12-26 10:40:30 +08:00
Pleasure1234 f08d847c20
fix: add transparent border to prevent button size flickering (#30128) 2025-12-25 19:50:21 +08:00
JeeekXY 0f85ce3d0e
fix: prioritize copying selected text (#30141) 2025-12-25 16:22:42 +08:00
zxhlyh fb14644a79
fix: workflow past version data sync (#30139) 2025-12-25 11:53:33 +08:00
yyh 3cbbb06dc4
chore(web): migrate lodash-es to es-toolkit compat (#30126) 2025-12-25 09:44:57 +08:00
Maries 02e0fadef7
feat: add editing support for trigger subscriptions (#29957)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2025-12-24 19:15:54 +08:00
yyh 5896bc89f5
refactor(web): migrate workflow run history from useSWR to TanStack Query (#30077) 2025-12-24 18:21:01 +08:00
Stephen Zhou 1e3823e605
chore: fix type check for i18n (#30058)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2025-12-24 16:31:16 +08:00
wangxiaolei 870a6427c9
feat: allow user close the tab to sync the draft (#30034) 2025-12-23 19:01:29 +08:00
Stephen Zhou 403adefc07
chore: lint require and how to import react (#30041) 2025-12-23 18:02:10 +08:00
Stephen Zhou f2842da397
chore(web): new lint setup (#30020)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2025-12-23 16:58:55 +08:00
非法操作 9701a2994b
chore: Translate stray Chinese comment to English (#30024)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-12-23 14:05:21 +08:00
GuanMu c3b713d88a
fix: adjust padding in entry node container for better alignment (#29999) 2025-12-22 21:16:57 +08:00
Stephen Zhou eabdc5f0eb
refactor(web): migrate to Vitest and esm (#29974)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2025-12-22 16:35:22 +08:00
yyh 079620714e
refactor: migrate common service toward TanStack Query (#29009) 2025-12-19 17:34:14 +08:00
Stephen Zhou a26881cb24
refactor: unified cn utils (#29916)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2025-12-19 12:08:34 +08:00
wcc0077 114f17f1ca
fix: remove unnecessary min-width css style from AllTools and Blocks components (#29810) 2025-12-18 10:14:29 +08:00
Wu Tianwei 1d1351393a
feat: update RAG recommended plugins hook to accept type parameter (#29735) 2025-12-17 13:48:23 +08:00
Angel98518 c2f2be6b08
fix: oxlint no unused expressions (#29675)
Co-authored-by: daniel <daniel@example.com>
2025-12-16 18:00:04 +08:00
Coding On Star d942adf3b2
feat: Enhance Amplitude tracking across various components (#29662)
Co-authored-by: CodingOnStar <hanxujiang@dify.ai>
2025-12-15 15:25:10 +08:00
Chen Jiaju 63624dece1
fix(workflow): tool plugin output_schema array type not selectable in subsequent nodes (#29035)
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-15 11:17:15 +08:00
yyh 59137f1d05
fix: show uninstalled plugin nodes in workflow checklist (#29630) 2025-12-15 10:11:23 +08:00
Agung Besti 3db27c3158
fix(workflow): agent prompt editor canvas not covering full text height (#29623) 2025-12-14 15:53:39 +08:00
Wu Tianwei 94244ed8f6
fix: handle potential undefined values in query_attachment_selector across multiple components (#29429) 2025-12-10 19:30:21 +08:00
Wu Tianwei bafd093fa9
fix: Add dataset file upload restrictions (#29397)
Co-authored-by: kurokobo <kuro664@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2025-12-10 16:41:05 +08:00
yyh 18601d8b38
Refactor datasets service toward TanStack Query (#29008)
Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com>
2025-12-09 13:48:23 +08:00
Wu Tianwei 14d1b3f9b3
feat: multimodal support (image) (#27793)
Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 11:44:50 +08:00
非法操作 a44b800c85
chore: find more redirect to correct category (#29303) 2025-12-09 11:09:43 +08:00
yyh c012eddb47
chore(web): run oxlint before eslint (#29224) 2025-12-07 11:36:33 +08:00
Wu Tianwei e7c26a2f3f
refactor: update useNodes import to use reactflow across multiple components (#29195) 2025-12-05 16:38:03 +08:00
非法操作 3e5f683e90
feat: dark theme icon support (#28858) 2025-12-04 09:29:00 +08:00
Joel 876f48df76
chore: remove useless mock files (#29068) 2025-12-03 15:34:11 +08:00
yyh 626d4f3e35
fix(web): use atomic selectors to fix Zustand v5 infinite loop (#28977) 2025-12-01 15:45:50 +08:00