fix: 调试日志

This commit is contained in:
hp0912 2026-05-17 20:36:08 +08:00
parent 4c4a3c5c95
commit 068eb984e5
2 changed files with 4 additions and 0 deletions

View File

@ -267,6 +267,8 @@ def _truncate_debug_payload(value):
def _debug_response(label: str, payload) -> None:
if os.environ.get("SKILL_DEBUG_LOG", "").strip().lower() not in {"true", "1"}:
return
if hasattr(payload, "model_dump"):
payload = payload.model_dump()
payload = _truncate_debug_payload(payload)

View File

@ -269,6 +269,8 @@ def _truncate_debug_payload(value):
def _debug_response(label: str, payload) -> None:
if os.environ.get("SKILL_DEBUG_LOG", "").strip().lower() not in {"true", "1"}:
return
if hasattr(payload, "model_dump"):
payload = payload.model_dump()
payload = _truncate_debug_payload(payload)