feat: add MCP tool and web UI management

This commit is contained in:
lpf
2026-03-07 22:09:52 +08:00
parent cff379809c
commit fb5a228e7d
16 changed files with 1836 additions and 4 deletions

View File

@@ -8,6 +8,8 @@ const resources = {
dashboard: 'Dashboard',
chat: 'Chat',
config: 'Config',
mcpServices: 'MCP',
mcpServicesHint: 'Manage MCP servers, install packages, and inspect discovered remote tools.',
cronJobs: 'Cron Jobs',
nodes: 'Nodes',
agentTree: 'Agent Tree',
@@ -298,6 +300,23 @@ const resources = {
configProxies: 'Proxies',
configNewProviderName: 'new provider name',
configNoCustomProviders: 'No custom providers yet.',
configMCPServers: 'MCP Servers',
configNewMCPServerName: 'new MCP server name',
configNoMCPServers: 'No MCP servers configured yet.',
configMCPInstallTitle: 'Install MCP Server Package',
configMCPInstallMessage: 'Install an npm package for MCP server "{{name}}"?',
configMCPInstallPlaceholder: '@scope/package',
configMCPInstalling: 'Installing MCP package...',
configMCPInstallFailedTitle: 'MCP install failed',
configMCPInstallFailedMessage: 'Failed to install MCP package',
configMCPInstallDoneTitle: 'MCP package installed',
configMCPInstallDoneMessage: 'Installed {{package}} and resolved binary {{bin}}.',
configMCPInstallDoneFallback: 'MCP package installed.',
configMCPDiscoveredTools: 'Discovered MCP Tools',
configMCPDiscoveredToolsCount: '{{count}} discovered',
configNoMCPDiscoveredTools: 'No MCP tools discovered yet.',
configDeleteMCPServerConfirmTitle: 'Delete MCP Server',
configDeleteMCPServerConfirmMessage: 'Delete MCP server "{{name}}" from current config?',
configNoGroups: 'No config groups found.',
configDiffPreviewCount: 'Diff Preview ({{count}} items)',
saveConfigFailed: 'Failed to save config',
@@ -388,6 +407,7 @@ const resources = {
api_base: 'API Base',
protocol: 'Protocol',
models: 'Models',
command: 'Command',
responses: 'Responses',
streaming: 'Streaming',
web_search_enabled: 'Web Search Enabled',
@@ -403,6 +423,7 @@ const resources = {
version: 'Version',
name: 'Name',
description: 'Description',
package: 'Package',
system_prompt: 'System Prompt',
tools: 'Tools',
auth: 'Authentication',
@@ -479,8 +500,14 @@ const resources = {
sandbox: 'Sandbox',
image: 'Image',
web: 'Web',
mcp: 'MCP',
search: 'Search',
max_results: 'Max Results',
request_timeout_sec: 'Request Timeout (Seconds)',
servers: 'Servers',
transport: 'Transport',
args: 'Arguments',
env: 'Environment',
proxies: 'Proxies',
cross_session_call_id: 'Cross-session Call ID',
supports_responses_compact: 'Supports Responses Compact',
@@ -502,6 +529,8 @@ const resources = {
dashboard: '仪表盘',
chat: '对话',
config: '配置',
mcpServices: 'MCP',
mcpServicesHint: '管理 MCP 服务、安装服务包,并查看已发现的远端工具。',
cronJobs: '定时任务',
nodes: '节点',
agentTree: '代理树',
@@ -792,6 +821,23 @@ const resources = {
configProxies: '代理配置',
configNewProviderName: '新 provider 名称',
configNoCustomProviders: '暂无自定义 provider。',
configMCPServers: 'MCP 服务',
configNewMCPServerName: '新的 MCP 服务名',
configNoMCPServers: '暂无 MCP 服务配置。',
configMCPInstallTitle: '安装 MCP 服务包',
configMCPInstallMessage: '是否为 MCP 服务 “{{name}}” 安装 npm 包?',
configMCPInstallPlaceholder: '@scope/package',
configMCPInstalling: '正在安装 MCP 包...',
configMCPInstallFailedTitle: 'MCP 安装失败',
configMCPInstallFailedMessage: '安装 MCP 包失败',
configMCPInstallDoneTitle: 'MCP 包安装完成',
configMCPInstallDoneMessage: '已安装 {{package}},并解析到可执行文件 {{bin}}。',
configMCPInstallDoneFallback: 'MCP 包已安装。',
configMCPDiscoveredTools: '已发现的 MCP 工具',
configMCPDiscoveredToolsCount: '已发现 {{count}} 个',
configNoMCPDiscoveredTools: '暂未发现 MCP 工具。',
configDeleteMCPServerConfirmTitle: '删除 MCP 服务',
configDeleteMCPServerConfirmMessage: '确认从当前配置中删除 MCP 服务 “{{name}}”吗?',
configNoGroups: '未找到配置分组。',
configDiffPreviewCount: '配置差异预览({{count}}项)',
saveConfigFailed: '保存配置失败',
@@ -882,6 +928,7 @@ const resources = {
api_base: 'API 基础地址',
protocol: '协议',
models: '模型列表',
command: '命令',
responses: 'Responses 配置',
streaming: '流式输出',
web_search_enabled: '启用网页搜索',
@@ -897,6 +944,7 @@ const resources = {
version: '版本',
name: '名称',
description: '描述',
package: '包名',
system_prompt: '系统提示词',
tools: '工具',
auth: '身份验证',
@@ -973,8 +1021,14 @@ const resources = {
sandbox: '沙箱',
image: '镜像',
web: 'Web',
mcp: 'MCP',
search: '搜索',
max_results: '最大结果数',
request_timeout_sec: '请求超时(秒)',
servers: '服务列表',
transport: '传输方式',
args: '参数',
env: '环境变量',
proxies: '代理集合',
cross_session_call_id: '跨会话调用 ID',
supports_responses_compact: '支持紧凑 responses',