Skip to content

Commit 63faf90

Browse files
clear prints
1 parent fd87b7f commit 63faf90

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

examples/agents/todo_tools_example.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ async def main():
5151
case ToolCall():
5252
if response.name == "todo_manager":
5353
action = response.arguments.get("action", "unknown")
54-
print(f"\n🔧 [TOOL] {action.upper()}", end="", flush=True)
5554

5655
if action == "create":
5756
tasks = response.arguments.get("tasks", [])
@@ -60,57 +59,6 @@ async def main():
6059
for i, task in enumerate(tasks, 1):
6160
print(f" {i}. {task}")
6261

63-
case ToolCallResult():
64-
if response.name == "todo_manager":
65-
result = response.result
66-
action = result.get("action", "unknown")
67-
68-
if action == "create":
69-
total = result.get('total_count', 0)
70-
print(f" ✅ {total} tasks created successfully", flush=True)
71-
current_task = result.get("current_task")
72-
if current_task:
73-
print(f"📋 Next: {current_task['description']}")
74-
elif action == "update":
75-
task = result.get("task", {})
76-
task_desc = task.get("description", "Unknown task")[:50]
77-
new_status = task.get("status", "unknown")
78-
print(f" ✅ Status changed to '{new_status}'", flush=True)
79-
print(f"📋 Task: {task_desc}{'...' if len(task.get('description', '')) > 50 else ''}")
80-
elif action == "complete_with_summary":
81-
progress = result.get("progress", "unknown")
82-
all_done = result.get("all_completed", False)
83-
completed_task = result.get("completed_task", {})
84-
task_desc = completed_task.get("description", "Unknown task")
85-
86-
if all_done:
87-
print(f" ✅ FINAL TASK COMPLETED! Progress: {progress}", flush=True)
88-
print(f"🎉 All tasks finished! Preparing final summary...")
89-
else:
90-
print(f" ✅ Task completed. Progress: {progress}", flush=True)
91-
next_task = result.get("next_task")
92-
if next_task:
93-
print(f"📋 Next: {next_task['description']}")
94-
elif action == "get_final_summary":
95-
total_completed = result.get("total_completed", 0)
96-
print(f" ✅ Final summary ready ({total_completed} tasks)", flush=True)
97-
print("📄 Complete results below:")
98-
elif action == "get_current":
99-
current_task = result.get("current_task")
100-
all_completed = result.get("all_completed", False)
101-
if all_completed:
102-
print(f" ✅ All tasks completed!", flush=True)
103-
elif current_task:
104-
print(f" ✅ Current task identified", flush=True)
105-
print(f"📋 Current: {current_task['description']}")
106-
else:
107-
print(f" ✅ No current task", flush=True)
108-
elif action == "get":
109-
progress = result.get("progress", "unknown")
110-
print(f" ✅ Task overview retrieved (Progress: {progress})", flush=True)
111-
else:
112-
print(f" ✅ {action} completed", flush=True)
113-
11462
print("\n\n" + "="*50)
11563
print("🎉 Systematic hiking trip planning completed!")
11664

0 commit comments

Comments
 (0)