dify/api/core/workflow
Yansong Zhang 482a004efe fix(api): fix duplicate answer and completion app upgrade issues
1. Remove StreamChunkEvent from AgentV2Node._run_without_tools():
   The agent-v2 node was yielding StreamChunkEvent during LLM streaming,
   AND the downstream answer node was outputting the same text via
   {{#agent.text#}} variable reference, causing "FourFour" duplication.
   Now text only flows through outputs.text -> answer node (single path).

2. Map inputs to query for completion app transparent upgrade:
   Completion apps send {inputs: {query: "..."}} not {query: "..."}.
   VirtualWorkflowSynthesizer route now extracts query from inputs
   when the top-level query is missing.

Verified:
- Old chat app: "What is 2+2?" -> "Four" (was "FourFour")
- Old completion app: {inputs: {query: "What is 3+3?"}} -> "3 + 3 = 6" (was failing)
- Old agent-chat app: still works

Made-with: Cursor
2026-04-09 12:02:43 +08:00
..
nodes fix(api): fix duplicate answer and completion app upgrade issues 2026-04-09 12:02:43 +08:00
__init__.py refactor(api): move workflow knowledge nodes and trigger nodes (#33445) 2026-03-15 15:24:59 +08:00
file_reference.py refactor(api): continue decoupling dify_graph from API concerns (#33580) 2026-03-25 20:32:24 +08:00
human_input_compat.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
human_input_forms.py refactor(api): continue decoupling dify_graph from API concerns (#33580) 2026-03-25 20:32:24 +08:00
node_factory.py feat(api): implement zero-migration transparent upgrade (Phase 8) 2026-04-09 10:30:52 +08:00
node_runtime.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
system_variables.py refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
template_rendering.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
variable_pool_initializer.py refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00
variable_prefixes.py refactor(api): continue decoupling dify_graph from API concerns (#33580) 2026-03-25 20:32:24 +08:00
workflow_entry.py refactor(api): type single-node graph structure with TypedDicts in workflow_entry (#34671) 2026-04-07 13:18:00 +00:00
workflow_run_outputs.py refactor(api): rename dify_graph to graphon (#34095) 2026-03-25 21:58:56 +08:00