mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-16 03:14:45 +08:00
refactor: optimize task tool parameter order and improve task tracking
- Reorder task tool parameters to prioritize description first for better usability - Add tool_call_id injection for better task traceability - Use tool_call_id as task_id in executor for consistent tracking - Simplify event messages by removing redundant task_type field - Update task examples in prompt to reflect new parameter order Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -284,16 +284,19 @@ class SubagentExecutor:
|
||||
|
||||
return result
|
||||
|
||||
def execute_async(self, task: str) -> str:
|
||||
def execute_async(self, task: str, task_id: str | None = None) -> str:
|
||||
"""Start a task execution in the background.
|
||||
|
||||
Args:
|
||||
task: The task description for the subagent.
|
||||
task_id: Optional task ID to use. If not provided, a random UUID will be generated.
|
||||
|
||||
Returns:
|
||||
Task ID that can be used to check status later.
|
||||
"""
|
||||
task_id = str(uuid.uuid4())[:8]
|
||||
# Use provided task_id or generate a new one
|
||||
if task_id is None:
|
||||
task_id = str(uuid.uuid4())[:8]
|
||||
|
||||
# Create initial pending result
|
||||
result = SubagentResult(
|
||||
|
||||
Reference in New Issue
Block a user