auto-sync: 2026-05-17 13:48:56
This commit is contained in:
@@ -145,9 +145,20 @@ class Dispatcher:
|
||||
try:
|
||||
if self.counter:
|
||||
await self.counter.acquire(agent_id)
|
||||
session_id = await self.spawner.spawn_full_agent(
|
||||
agent_id=agent_id,
|
||||
message=self._build_message(task, action_type),
|
||||
# 优先使用 spawner 的 prompt 模板
|
||||
if hasattr(self.spawner, 'build_spawn_message') and project_config:
|
||||
message = self.spawner.build_spawn_message(
|
||||
task_id=task.id,
|
||||
title=task.title,
|
||||
description=task.description or "",
|
||||
task_type=task.task_type or "",
|
||||
priority=task.priority,
|
||||
must_haves=task.must_haves or "",
|
||||
project_id=project_config.get("project_id", ""),
|
||||
agent_id=agent_id,
|
||||
)
|
||||
else:
|
||||
message = self._build_message(task, action_type)
|
||||
new_session=decision.get("new_session", False),
|
||||
task_id=task.id,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user