mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-18 20:14:44 +08:00
Merge upstream/experimental: resolve conflict in lead_agent/prompt.py
- Keep upstream subagent HARD LIMIT (max 3 task calls, batching) in subagent_reminder - Keep our removal of Citations: do not add back 'Citations when synthesizing' Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -392,23 +392,6 @@ class SubagentExecutor:
|
||||
MAX_CONCURRENT_SUBAGENTS = 3
|
||||
|
||||
|
||||
def count_active_tasks_by_trace(trace_id: str) -> int:
|
||||
"""Count active (PENDING or RUNNING) background tasks for a given trace_id.
|
||||
|
||||
Args:
|
||||
trace_id: The trace ID linking tasks to a parent invocation.
|
||||
|
||||
Returns:
|
||||
Number of active tasks with the given trace_id.
|
||||
"""
|
||||
with _background_tasks_lock:
|
||||
return sum(
|
||||
1
|
||||
for task in _background_tasks.values()
|
||||
if task.trace_id == trace_id and task.status in (SubagentStatus.PENDING, SubagentStatus.RUNNING)
|
||||
)
|
||||
|
||||
|
||||
def get_background_task_result(task_id: str) -> SubagentResult | None:
|
||||
"""Get the result of a background task.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user