diff --git a/astrbot/dashboard/routes/plugin.py b/astrbot/dashboard/routes/plugin.py index 9fb9d231a..9f76e2a71 100644 --- a/astrbot/dashboard/routes/plugin.py +++ b/astrbot/dashboard/routes/plugin.py @@ -145,7 +145,9 @@ class PluginRoute(Route): if handler.event_type == EventType.AdapterMessageEvent: # 处理平台适配器消息事件 has_admin = False - for filter in ( + for ( + filter + ) in ( handler.event_filters ): # 正常handler就只有 1~2 个 filter,因此这里时间复杂度不会太高 if isinstance(filter, CommandFilter): diff --git a/dashboard/src/views/ToolUsePage.vue b/dashboard/src/views/ToolUsePage.vue index fe546a2b9..312fca87b 100644 --- a/dashboard/src/views/ToolUsePage.vue +++ b/dashboard/src/views/ToolUsePage.vue @@ -560,7 +560,16 @@ export default { // 过滤后的市场服务器 filteredMarketplaceServers() { - return this.marketplaceServers; + if (!this.marketplaceSearch.trim()) { + return this.marketplaceServers; + } + + const searchTerm = this.marketplaceSearch.toLowerCase(); + return this.marketplaceServers.filter(server => + server.name.toLowerCase().includes(searchTerm) || + (server.name_h && server.name_h.toLowerCase().includes(searchTerm)) || + (server.description && server.description.toLowerCase().includes(searchTerm)) + ); }, },