mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-07 08:41:16 +08:00
refactor(agent): rename list_all_commands to list_slash_commands and skill to command-dispatch
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""查询所有可用命令工具(系统命令 + 插件命令)"""
|
||||
"""查询所有可用斜杠命令工具(系统命令 + 插件命令)"""
|
||||
|
||||
import json
|
||||
from typing import Optional, Type
|
||||
@@ -10,8 +10,8 @@ from app.command import Command
|
||||
from app.log import logger
|
||||
|
||||
|
||||
class ListAllCommandsInput(BaseModel):
|
||||
"""查询所有可用命令工具的输入参数模型"""
|
||||
class ListSlashCommandsInput(BaseModel):
|
||||
"""查询所有可用斜杠命令工具的输入参数模型"""
|
||||
|
||||
explanation: str = Field(
|
||||
...,
|
||||
@@ -19,17 +19,17 @@ class ListAllCommandsInput(BaseModel):
|
||||
)
|
||||
|
||||
|
||||
class ListAllCommandsTool(MoviePilotTool):
|
||||
name: str = "list_all_commands"
|
||||
class ListSlashCommandsTool(MoviePilotTool):
|
||||
name: str = "list_slash_commands"
|
||||
description: str = (
|
||||
"List all available commands in the system, including system preset commands "
|
||||
"List all available slash commands in the system, including system preset commands "
|
||||
"(e.g. /cookiecloud, /sites, /subscribes, /downloading, /transfer, /restart, etc.) "
|
||||
"and plugin-registered commands. "
|
||||
"Use this tool to discover what commands are available before executing them with run_slash_command. "
|
||||
"Use this tool to discover what slash commands are available before executing them with run_slash_command. "
|
||||
"This is especially useful when the user describes an action in natural language and you need to "
|
||||
"find the matching command to fulfill their request."
|
||||
)
|
||||
args_schema: Type[BaseModel] = ListAllCommandsInput
|
||||
args_schema: Type[BaseModel] = ListSlashCommandsInput
|
||||
require_admin: bool = True
|
||||
|
||||
def get_tool_message(self, **kwargs) -> Optional[str]:
|
||||
@@ -24,7 +24,7 @@ class RunSlashCommandInput(BaseModel):
|
||||
description="The slash command to execute, e.g. '/cookiecloud'. "
|
||||
"Must start with '/'. Can include arguments after the command, e.g. '/command arg1 arg2'. "
|
||||
"Use query_plugin_capabilities tool to discover available plugin commands, "
|
||||
"or list_all_commands tool to discover all available commands (including system commands).",
|
||||
"or list_slash_commands tool to discover all available commands (including system commands).",
|
||||
)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class RunSlashCommandTool(MoviePilotTool):
|
||||
"1) System preset commands (e.g. /cookiecloud, /sites, /subscribes, /downloading, /transfer, /restart, etc.) "
|
||||
"2) Plugin commands registered by installed plugins. "
|
||||
"Use the query_plugin_capabilities tool to discover plugin commands, "
|
||||
"or the list_all_commands tool to discover all available commands. "
|
||||
"or the list_slash_commands tool to discover all available commands. "
|
||||
"The command will be executed asynchronously. "
|
||||
"Note: This tool triggers the command execution but the actual processing happens in the background."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user