fix(command_manager): 修复插件卸载时元信息移除不精确的问题
修复 CommandManager 中 unload_plugin 方法移除插件元信息时使用 startswith 导致可能误删其他插件的问题,改为精确匹配 同时调整相关测试用例验证精确匹配行为
This commit is contained in:
@@ -93,7 +93,7 @@ class CommandManager:
|
||||
self.request_handler.unregister_by_plugin_name(plugin_name)
|
||||
|
||||
# 移除插件元信息
|
||||
plugins_to_remove = [name for name in self.plugins if name.startswith(plugin_name)]
|
||||
plugins_to_remove = [name for name in self.plugins if name == plugin_name]
|
||||
for name in plugins_to_remove:
|
||||
del self.plugins[name]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user