Merge PR #83: [moz] fix(spawner): PromptContext event_type/event_data 缺失修复
Deploy / ci (push) Failing after 7s
Deploy / deploy (push) Has been skipped
Deploy / notify-deploy-failure (push) Successful in 0s
Deploy / notify-deploy-success (push) Successful in 0s

This commit was merged in pull request #83.
This commit is contained in:
2026-06-16 23:21:02 +00:00
+5
View File
@@ -288,6 +288,8 @@ class AgentSpawner:
mail_type = ""
action_type = ""
action_steps = []
event_type = ""
event_data = {}
try:
meta = json.loads(must_haves) if must_haves else {}
from_agent = meta.get("from", "")
@@ -295,6 +297,8 @@ class AgentSpawner:
# toolchain 字段提取
action_type = meta.get("action_type", "")
action_steps = meta.get("steps", [])
event_type = meta.get("event_type", "")
event_data = meta.get("context", {})
except Exception:
pass
ctx = PromptContext(
@@ -304,6 +308,7 @@ class AgentSpawner:
spawn_type=spawn_type,
from_agent=from_agent, mail_type=mail_type,
action_type=action_type, action_steps=action_steps,
event_type=event_type, event_data=event_data,
)
return handler.build_prompt(ctx)