mirror of
https://github.com/langgenius/dify.git
synced 2026-08-29 19:54:46 +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 |
||
|---|---|---|
| .. | ||
| agent | ||
| agent_v2 | ||
| command | ||
| datasource | ||
| file_upload | ||
| knowledge_index | ||
| knowledge_retrieval | ||
| trigger_plugin | ||
| trigger_schedule | ||
| trigger_webhook | ||
| __init__.py | ||