feat(web): enable MCP market configuration and service management

- Add market configuration API endpoints for creating, updating, and retrieving market configs
- Add market MCP listing and detail endpoints with support for activated services
- Implement MarketConfigModal component for configuring market connections with URL and API key
- Implement McpServiceModal component for viewing and managing MCP services from markets
- Add infinite scroll pagination for market sources and MCP services
- Add market connection status indicators (connected/disconnected/connecting states)
- Add i18n translations for market configuration UI (en and zh)
- Update Market component to display market sources with connection management
- Add MarketQuery type for market-specific API queries
- Refactor market data structure to match backend API response format
This commit is contained in:
yujiangping
2026-03-06 14:55:45 +08:00
parent 85aea97c21
commit 0ea83b4364
8 changed files with 515 additions and 207 deletions

View File

@@ -69,7 +69,7 @@ const McpServiceModal = forwardRef<McpServiceModalRef, McpServiceModalProps>(({
config: { ...config_data }
})
if (config_data.connection_config.headers) {
if (config_data?.connection_config?.headers) {
console.log(Object.keys(config_data.connection_config.headers).map(key => ({
key,
value: config_data.connection_config.headers[key]
@@ -80,6 +80,12 @@ const McpServiceModal = forwardRef<McpServiceModalRef, McpServiceModalProps>(({
})))
}
setEditVo(data)
} else if (data) {
const { config_data, name, description, icon } = data
form.setFieldsValue({
name, description, icon,
...(config_data ? { config: { ...config_data } } : {})
})
} else {
form.resetFields();
}