Skip to content

Build and run agents you can see, understand and trust.

fix(hook): make `set_console_output_enabled` only affect console printing (#1186)

zhijianma9c7e418d7d34
diff --git a/src/agentscope/hooks/_studio_hooks.py b/src/agentscope/hooks/_studio_hooks.py
index 5104b01b9..07f39f59c 100644
--- a/src/agentscope/hooks/_studio_hooks.py
+++ b/src/agentscope/hooks/_studio_hooks.py
@@ -16,9 +16,6 @@ def as_studio_forward_message_pre_print_hook(
run_id: str,
) -> None:
"""The pre-speak hook to forward messages to the studio."""
- # Disable console output if needed
- if self._disable_console_output: # pylint: disable=protected-access
- return
msg = kwargs["msg"]