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
4 changes: 3 additions & 1 deletion agents/s01_agent_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ def agent_loop(messages: list):
query = input("\033[36ms01 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
history.append({"role": "user", "content": query})
agent_loop(history)
response_content = history[-1]["content"]
Expand Down
4 changes: 3 additions & 1 deletion agents/s02_tool_use.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ def agent_loop(messages: list):
query = input("\033[36ms02 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
history.append({"role": "user", "content": query})
agent_loop(history)
response_content = history[-1]["content"]
Expand Down
4 changes: 3 additions & 1 deletion agents/s03_todo_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ def agent_loop(messages: list):
query = input("\033[36ms03 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
history.append({"role": "user", "content": query})
agent_loop(history)
response_content = history[-1]["content"]
Expand Down
4 changes: 3 additions & 1 deletion agents/s04_subagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@ def agent_loop(messages: list):
query = input("\033[36ms04 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
history.append({"role": "user", "content": query})
agent_loop(history)
response_content = history[-1]["content"]
Expand Down
4 changes: 3 additions & 1 deletion agents/s05_skill_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ def agent_loop(messages: list):
query = input("\033[36ms05 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
history.append({"role": "user", "content": query})
agent_loop(history)
response_content = history[-1]["content"]
Expand Down
4 changes: 3 additions & 1 deletion agents/s06_context_compact.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,10 @@ def agent_loop(messages: list):
query = input("\033[36ms06 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
history.append({"role": "user", "content": query})
agent_loop(history)
response_content = history[-1]["content"]
Expand Down
4 changes: 3 additions & 1 deletion agents/s07_task_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,10 @@ def agent_loop(messages: list):
query = input("\033[36ms07 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
history.append({"role": "user", "content": query})
agent_loop(history)
response_content = history[-1]["content"]
Expand Down
4 changes: 3 additions & 1 deletion agents/s08_background_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,10 @@ def agent_loop(messages: list):
query = input("\033[36ms08 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
history.append({"role": "user", "content": query})
agent_loop(history)
response_content = history[-1]["content"]
Expand Down
4 changes: 3 additions & 1 deletion agents/s09_agent_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,10 @@ def agent_loop(messages: list):
query = input("\033[36ms09 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
if query.strip() == "/team":
print(TEAM.list_all())
continue
Expand Down
4 changes: 3 additions & 1 deletion agents/s10_team_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,10 @@ def agent_loop(messages: list):
query = input("\033[36ms10 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
if query.strip() == "/team":
print(TEAM.list_all())
continue
Expand Down
4 changes: 3 additions & 1 deletion agents/s11_autonomous_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,10 @@ def agent_loop(messages: list):
query = input("\033[36ms11 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
if query.strip() == "/team":
print(TEAM.list_all())
continue
Expand Down
4 changes: 3 additions & 1 deletion agents/s12_worktree_task_isolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,10 @@ def agent_loop(messages: list):
query = input("\033[36ms12 >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
history.append({"role": "user", "content": query})
agent_loop(history)
response_content = history[-1]["content"]
Expand Down
4 changes: 3 additions & 1 deletion agents/s_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,10 @@ def agent_loop(messages: list):
query = input("\033[36ms_full >> \033[0m")
except (EOFError, KeyboardInterrupt):
break
if query.strip().lower() in ("q", "exit", ""):
if query.strip().lower() in ("q", "exit"):
break
if not query.strip():
continue
if query.strip() == "/compact":
if history:
print("[manual compact via /compact]")
Expand Down