feat: 增强命令调用逻辑,支持通过 plugin.invoke_command 返回原始结构,并优化消息统计功能

This commit is contained in:
DrSmoothl
2026-03-13 10:49:20 +08:00
parent 0d9eff7001
commit bcb7963d37
4 changed files with 51 additions and 18 deletions

View File

@@ -582,11 +582,13 @@ class TestComponentRegistry:
match = reg.find_command_by_text("/help me")
assert match is not None
assert match.name == "help"
comp, groups = match
assert comp.name == "help"
match = reg.find_command_by_text("/echo hello")
assert match is not None
assert match.name == "echo"
comp, groups = match
assert comp.name == "echo"
match = reg.find_command_by_text("no match")
assert match is None