auto-sync: 2026-05-29 01:13:38
This commit is contained in:
+6
-15
@@ -509,23 +509,14 @@ Round 上限: {self.MAX_ROUNDS}(当前第 {round_num} 轮)
|
||||
agent_id = "pangtong-fujunshi"
|
||||
session_id = f"review-{parent_task.id}-r{parent_task.round_count + 1}"
|
||||
|
||||
# 构建上下文
|
||||
context = self.spawner.build_context(
|
||||
# 用 spawner.spawn_full_agent 直接 spawn
|
||||
result = await self.spawner.spawn_full_agent(
|
||||
agent_id=agent_id,
|
||||
message=review_prompt,
|
||||
new_session=True,
|
||||
task_id=parent_task.id,
|
||||
project_id=project_id,
|
||||
)
|
||||
|
||||
# 拼接 prompt
|
||||
full_prompt = f"{context}\n\n{review_prompt}"
|
||||
|
||||
# spawn
|
||||
result = await self.spawner.spawn(
|
||||
agent_id=agent_id,
|
||||
session_id=session_id,
|
||||
prompt=full_prompt,
|
||||
project_id=project_id,
|
||||
task_id=parent_task.id,
|
||||
use_main_session=False,
|
||||
task_db_path=None,
|
||||
)
|
||||
|
||||
return result is not None
|
||||
|
||||
Reference in New Issue
Block a user