Add PlusCommand enhanced command system

Introduces the PlusCommand system for simplified command development, including new base classes, argument parsing utilities, and registration logic. Updates the plugin system, component registry, and bot message handling to support PlusCommand components alongside traditional commands. Adds documentation and configuration for command prefixes, and provides a developer guide for the new system.
This commit is contained in:
雅诺狐
2025-08-27 22:21:03 +08:00
committed by Windpicker-owo
parent 0616623e71
commit a2873a71ef
13 changed files with 1135 additions and 22 deletions

View File

@@ -17,6 +17,7 @@ from .base import (
ComponentInfo,
ActionInfo,
CommandInfo,
PlusCommandInfo,
PluginInfo,
ToolInfo,
PythonDependency,
@@ -25,6 +26,12 @@ from .base import (
EventType,
MaiMessages,
ToolParamType,
# 新增的增强命令系统
PlusCommand,
CommandArgs,
PlusCommandAdapter,
create_plus_command_adapter,
ChatType,
)
# 导入工具模块
@@ -81,10 +88,17 @@ __all__ = [
"BaseCommand",
"BaseTool",
"BaseEventHandler",
# 增强命令系统
"PlusCommand",
"CommandArgs",
"PlusCommandAdapter",
"create_plus_command_adapter",
"create_plus_command_adapter",
# 类型定义
"ComponentType",
"ActionActivationType",
"ChatMode",
"ChatType",
"ComponentInfo",
"ActionInfo",
"CommandInfo",