Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions s12_task_system/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,4 +373,6 @@ def agent_loop(messages: list, context: dict):
for block in history[-1]["content"]:
if getattr(block, "type", None) == "text":
print(block.text)
elif isinstance(block, dict) and block.get("type") == "text":
print(block.get("text", ""))
print()
2 changes: 2 additions & 0 deletions s13_background_tasks/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,4 +475,6 @@ def agent_loop(messages: list, context: dict):
for block in history[-1]["content"]:
if getattr(block, "type", None) == "text":
print(block.text)
elif isinstance(block, dict) and block.get("type") == "text":
print(block.get("text", ""))
print()
2 changes: 2 additions & 0 deletions s15_agent_teams/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,8 @@ def agent_loop(messages: list, context: dict):
for block in history[-1]["content"]:
if getattr(block, "type", None) == "text":
print(block.text)
elif isinstance(block, dict) and block.get("type") == "text":
print(block.get("text", ""))

# Check inbox for teammate results → inject into history
inbox = BUS.read_inbox("lead")
Expand Down
2 changes: 2 additions & 0 deletions s16_team_protocols/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,8 @@ def agent_loop(messages: list, context: dict):
for block in history[-1]["content"]:
if getattr(block, "type", None) == "text":
print(block.text)
elif isinstance(block, dict) and block.get("type") == "text":
print(block.get("text", ""))

# Check inbox → route protocol + inject into history
inbox_msgs = consume_lead_inbox(route_protocol=True)
Expand Down
2 changes: 2 additions & 0 deletions s17_autonomous_agents/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,8 @@ def agent_loop(messages: list, context: dict):
for block in history[-1]["content"]:
if getattr(block, "type", None) == "text":
print(block.text)
elif isinstance(block, dict) and block.get("type") == "text":
print(block.get("text", ""))

# Consume lead inbox: route protocol + inject into history
inbox = consume_lead_inbox(route_protocol=True)
Expand Down
2 changes: 2 additions & 0 deletions s18_worktree_isolation/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,8 @@ def agent_loop(messages: list, context: dict):
for block in history[-1]["content"]:
if getattr(block, "type", None) == "text":
print(block.text)
elif isinstance(block, dict) and block.get("type") == "text":
print(block.get("text", ""))

# Consume lead inbox: route protocol + inject into history
inbox = consume_lead_inbox(route_protocol=True)
Expand Down
2 changes: 2 additions & 0 deletions s19_mcp_plugin/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,8 @@ def agent_loop(messages: list, context: dict):
for block in history[-1]["content"]:
if getattr(block, "type", None) == "text":
print(block.text)
elif isinstance(block, dict) and block.get("type") == "text":
print(block.get("text", ""))

inbox = consume_lead_inbox(route_protocol=True)
if inbox:
Expand Down
4 changes: 2 additions & 2 deletions s20_comprehensive/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -2063,8 +2063,8 @@ def print_turn_assistants(messages: list, turn_start: int):
if msg.get("role") != "assistant":
continue
for block in msg.get("content", []):
if getattr(block, "type", None) == "text":
terminal_print(block.text)
if block_type(block) == "text":
terminal_print(block["text"] if isinstance(block, dict) else block.text)


def cron_autorun_loop(history: list, context: dict):
Expand Down