chore: initialize sandbox and overwrite remote content
Some checks failed
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_en (ubuntu-latest, 3.10) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_zh (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.12) (push) Has been cancelled

This commit is contained in:
codex-bot
2026-03-02 22:32:27 +08:00
commit a64378956a
584 changed files with 93604 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
"""The built-in hook functions in agentscope."""
from functools import partial
from ._studio_hooks import (
as_studio_forward_message_pre_print_hook,
)
from .. import _config
from ..agent import AgentBase
__all__ = [
"as_studio_forward_message_pre_print_hook",
]
def _equip_as_studio_hooks(
studio_url: str,
) -> None:
"""Connect to the agentscope studio."""
AgentBase.register_class_hook(
"pre_print",
"as_studio_forward_message_pre_print_hook",
partial(
as_studio_forward_message_pre_print_hook,
studio_url=studio_url,
run_id=_config.run_id,
),
)