mirror of
https://github.com/langgenius/dify.git
synced 2026-08-29 11:49:06 +08:00
Replace the hardcoded FunctionCallAgentRunner / CotChatAgentRunner / CotCompletionAgentRunner selection in AgentChatAppRunner with the new AgentAppRunner class that uses StrategyFactory from Phase 1. Before: AgentChatAppRunner manually selects FC/CoT runner class based on model features and LLM mode, then instantiates it directly. After: AgentChatAppRunner instantiates AgentAppRunner (from sandbox branch), which internally uses StrategyFactory.create_strategy() to auto-select the right strategy, and uses ToolInvokeHook for proper agent_invoke with file handling and thought persistence. This unifies the agent execution engine: both the new Agent V2 workflow node and the legacy agent-chat app now use the same StrategyFactory and AgentPattern implementations. Also fix: command and file_upload nodes use string node_type instead of BuiltinNodeTypes.COMMAND/FILE_UPLOAD (not in current graphon version). 46 tests pass. Flask starts successfully. Made-with: Cursor |
||
|---|---|---|
| .. | ||
| nodes | ||
| __init__.py | ||
| file_reference.py | ||
| human_input_compat.py | ||
| human_input_forms.py | ||
| node_factory.py | ||
| node_runtime.py | ||
| system_variables.py | ||
| template_rendering.py | ||
| variable_pool_initializer.py | ||
| variable_prefixes.py | ||
| workflow_entry.py | ||
| workflow_run_outputs.py | ||