Skip to content

Commit ea37068

Browse files
committed
chore(console): added effect between api calls
1 parent 9a05c19 commit ea37068

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

AgentCrew/modules/agents/local_agent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ def _enhance_agent_context_messages(self, final_messages: List[Dict[str, Any]]):
652652
}
653653
)
654654
if len(adaptive_messages["content"]) > 0:
655-
print(adaptive_messages)
656655
final_messages.insert(last_user_index, adaptive_messages)
657656

658657
agent_manager = self.services.get("agent_manager", None)

AgentCrew/modules/console/console_ui.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def listen(self, event: str, data: Any = None):
120120
self.tool_display.display_tool_use(data) # data is the tool use object
121121
elif event == "tool_result":
122122
pass
123+
self.ui_effects.start_loading_animation() # Stop loading on first chunk
123124
# self.tool_display.display_tool_result(data) # data is dict with tool_use and tool_result
124125
elif event == "tool_error":
125126
self.tool_display.display_tool_error(

AgentCrew/modules/console/ui_effects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _loading_animation(self, stop_event):
6363
"", console=self.console, auto_refresh=True, refresh_per_second=10
6464
) as live:
6565
while not stop_event.is_set():
66-
live.update(f"{fun_word} {next(self.spinner)}")
66+
live.update(f" {fun_word} {next(self.spinner)}")
6767
time.sleep(0.1) # Control animation speed
6868
live.update("") # Clear the live display when done
6969
live.stop() # Stop the live display
@@ -114,8 +114,8 @@ def start_streaming_response(self, agent_name: str, is_thinking=False):
114114

115115
self.live = Live(
116116
live_panel,
117+
refresh_per_second=10,
117118
console=self.console,
118-
auto_refresh=False,
119119
vertical_overflow="crop",
120120
)
121121
self.live.start()

0 commit comments

Comments
 (0)