feat(web): add search functionality and empty states to MCP market

- Add search input with debouncing (500ms) to filter MCP services by keywords
- Implement server-side search via keywords parameter in getMarketMCPs API call
- Add new i18n strings for empty states: marketNoData, marketNoDataDesc, marketNoSearchResult, marketNoSearchResultDesc
- Replace client-side filtering with server-side search for better performance
- Update Empty component display to show different messages for no data vs no search results
- Remove BodyWrapper component and implement custom empty state handling
- Add searchTimerRef to manage debounce timer lifecycle
- Update loadMore callback to include searchKeyword parameter for pagination consistency
- Add allowClear prop to search input for better UX
- Remove conditional rendering of search input to keep it always visible
This commit is contained in:
yujiangping
2026-03-11 18:24:46 +08:00
parent 01da2e3eee
commit 59618457df
5 changed files with 84 additions and 26 deletions

View File

@@ -1816,6 +1816,10 @@ export const zh = {
marketRefresh: '刷新',
marketConfigBtn: '配置',
marketConfigConnection: '配置连接',
marketNoData: '暂无数据',
marketNoDataDesc: '该市场暂时没有可用的服务',
marketNoSearchResult: '无搜索结果',
marketNoSearchResultDesc: '未找到匹配的服务,请尝试其他关键词',
marketNoServices: '暂无可用的 MCP 服务',
marketNotConnected: '尚未连接此市场',
marketNoServicesDesc: '该市场暂时没有可用的服务',