feat(agent): 新增AI_AGENT_VERBOSE开关,控制工具调用过程回复及提示词输出

This commit is contained in:
jxxghp
2026-03-27 20:12:01 +08:00
parent c3e96ae73f
commit 8d7ff2bd1d
4 changed files with 18 additions and 4 deletions

View File

@@ -81,19 +81,21 @@ class MoviePilotAgent:
"""
if not content:
return ""
if isinstance(content, str):
return content
# 跳过思考/推理类型的内容块
if isinstance(content, list):
text_parts = []
for block in content:
if isinstance(block, str):
text_parts.append(block)
elif isinstance(block, dict):
# 跳过思考/推理类型的内容块
# 优先检查 thought 标志LangChain Google GenAI 方案)
if block.get("thought"):
continue
if block.get("type") in (
"thinking",
"reasoning_content",
"reasoning",
"thought",
):
continue
if block.get("type") == "text":