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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user