mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-12 03:01:45 +08:00
将发送消息工具设为必选工具
This commit is contained in:
@@ -798,12 +798,6 @@ class MoviePilotAgent:
|
||||
always_include_tools = (
|
||||
MoviePilotToolFactory.get_tool_selector_always_include_names(tools)
|
||||
)
|
||||
if self.is_heartbeat_session:
|
||||
available_tool_names = {
|
||||
tool.name for tool in tools if getattr(tool, "name", None)
|
||||
}
|
||||
if "send_message" in available_tool_names:
|
||||
always_include_tools.append("send_message")
|
||||
|
||||
# 中间件
|
||||
middlewares = [
|
||||
|
||||
@@ -91,7 +91,7 @@ class MoviePilotToolFactory:
|
||||
"""
|
||||
|
||||
# 这些通用工具需要始终保留,避免大工具集裁剪后让 Agent 丢失基础的
|
||||
# 文件系统、命令执行或交互确认能力。AskUserChoiceTool 仅在支持按钮
|
||||
# 文件系统、命令执行、主动消息发送或交互确认能力。AskUserChoiceTool 仅在支持按钮
|
||||
# 的渠道中才会实际注入,因此后续会再按已加载工具做一次求交集。
|
||||
TOOL_SELECTOR_ALWAYS_INCLUDE_NAMES = (
|
||||
"list_directory",
|
||||
@@ -99,6 +99,7 @@ class MoviePilotToolFactory:
|
||||
"read_file",
|
||||
"edit_file",
|
||||
"execute_command",
|
||||
"send_message",
|
||||
"ask_user_choice",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user