| | |
| | | transportType: "Transport Type", |
| | | builtinCode: "Built-in MCP", |
| | | serverUrl: "Server URL", |
| | | endpoint: "SSE Endpoint", |
| | | headersJson: "Headers JSON", |
| | | command: "Command", |
| | | argsJson: "Args JSON", |
| | | envJson: "Env JSON", |
| | | requestTimeoutMs: "Timeout(ms)", |
| | | sort: "Sort", |
| | | healthStatus: "Health Status", |
| | | lastInitElapsedMs: "Last Init Elapsed(ms)", |
| | |
| | | emptyTitle: "No MCP mounts", |
| | | emptyDescription: "Create a built-in MCP, remote SSE mount, or local STDIO mount.", |
| | | sortValue: "Sort %{value}", |
| | | timeoutValue: "Timeout %{value} ms", |
| | | initValue: "Init %{value} ms", |
| | | noConnectivityTest: "No connectivity test has been run yet", |
| | | connectivityTest: "Connectivity Test", |
| | | }, |
| | |
| | | description: "Supports connectivity checks, structured schema preview, and generated test forms from input parameters.", |
| | | refresh: "Refresh Tools", |
| | | noTools: "No tools were resolved for this mount.", |
| | | connectivityInit: "Init %{value} ms", |
| | | connectivityToolCount: "Tools %{count}", |
| | | purpose: "Purpose: %{value}", |
| | | fieldCount: "%{count} fields", |
| | | returnDirect: "Return Direct", |
| | | normal: "Normal", |
| | | queryBoundary: "Query boundary: %{value}", |
| | | exampleQuestions: "Example Questions", |
| | | formattedSchema: "Formatted Input Schema", |
| | |
| | | fields: { |
| | | providerType: "提供方类型", |
| | | model: "模型", |
| | | baseUrl: "Base URL", |
| | | apiKey: "API Key", |
| | | temperature: "Temperature", |
| | | topP: "Top P", |
| | | maxTokens: "Max Tokens", |
| | | timeoutMs: "Timeout(ms)", |
| | | baseUrl: "服务地址", |
| | | apiKey: "API 密钥", |
| | | temperature: "温度", |
| | | topP: "Top P 采样", |
| | | maxTokens: "最大 Tokens", |
| | | timeoutMs: "超时(ms)", |
| | | streamingEnabled: "启用流式响应", |
| | | validateStatus: "最近校验状态", |
| | | lastValidateElapsedMs: "最近校验耗时(ms)", |
| | |
| | | failed: "AI 参数验证失败", |
| | | loading: "验证中...", |
| | | beforeSave: "保存前验证", |
| | | description: "会直接校验当前 Base URL、API Key 与模型是否可调用。", |
| | | description: "会直接校验当前服务地址、API 密钥与模型是否可调用。", |
| | | }, |
| | | form: { |
| | | sections: { |
| | |
| | | fields: { |
| | | code: "编码", |
| | | scene: "场景", |
| | | systemPrompt: "System Prompt", |
| | | userPromptTemplate: "User Prompt Template", |
| | | systemPrompt: "系统提示词", |
| | | userPromptTemplate: "用户提示词模板", |
| | | }, |
| | | list: { |
| | | emptyTitle: "暂无 Prompt 配置", |
| | |
| | | metadata: "示例元数据 JSON", |
| | | loading: "预览中...", |
| | | render: "预览渲染", |
| | | description: "用当前表单内容渲染 System Prompt 和 User Prompt。", |
| | | description: "用当前表单内容渲染系统提示词和用户提示词。", |
| | | resolvedVariables: "已解析变量:%{value}", |
| | | renderedSystemPrompt: "渲染后的 System Prompt", |
| | | renderedUserPrompt: "渲染后的 User Prompt", |
| | | renderedSystemPrompt: "渲染后的系统提示词", |
| | | renderedUserPrompt: "渲染后的用户提示词", |
| | | }, |
| | | form: { |
| | | sections: { |
| | |
| | | transportType: "传输类型", |
| | | builtinCode: "内置 MCP", |
| | | serverUrl: "服务地址", |
| | | endpoint: "SSE 端点", |
| | | headersJson: "请求头 JSON", |
| | | command: "命令", |
| | | argsJson: "参数 JSON", |
| | | envJson: "环境变量 JSON", |
| | | requestTimeoutMs: "超时(ms)", |
| | | sort: "排序", |
| | | healthStatus: "健康状态", |
| | | lastInitElapsedMs: "最近初始化耗时(ms)", |
| | |
| | | emptyTitle: "暂无 MCP 挂载", |
| | | emptyDescription: "可以新建内置 MCP、远程 SSE 挂载或本地 STDIO 挂载。", |
| | | sortValue: "排序 %{value}", |
| | | timeoutValue: "超时 %{value} ms", |
| | | initValue: "初始化 %{value} ms", |
| | | noConnectivityTest: "尚未执行连通性测试", |
| | | connectivityTest: "连通测试", |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | tools: { |
| | | schemaParseFailed: "Input Schema 解析失败: %{message}", |
| | | schemaParseFailed: "输入 Schema 解析失败: %{message}", |
| | | loadFailed: "获取工具列表失败", |
| | | inputRequired: "请输入工具测试 JSON", |
| | | testSuccess: "工具 %{name} 测试完成", |
| | |
| | | description: "支持连通性测试、结构化 Schema 预览和按输入参数自动生成测试表单。", |
| | | refresh: "刷新工具", |
| | | noTools: "当前挂载未解析出任何工具。", |
| | | connectivityInit: "初始化 %{value} ms", |
| | | connectivityToolCount: "工具 %{count} 个", |
| | | purpose: "用途: %{value}", |
| | | fieldCount: "%{count} 个参数", |
| | | returnDirect: "直接返回", |
| | | normal: "普通模式", |
| | | queryBoundary: "查询边界: %{value}", |
| | | exampleQuestions: "示例提问", |
| | | formattedSchema: "格式化 Input Schema", |
| | | formattedSchema: "格式化输入 Schema", |
| | | testInput: "测试输入 JSON", |
| | | testInputPlaceholder: "例如:{\"code\":\"A01\"}", |
| | | executeTest: "执行测试", |
| | |
| | | <TextInput source="serverUrl" label="ai.mcp.fields.serverUrl" fullWidth disabled={readOnly} /> |
| | | </Grid> |
| | | <Grid item xs={12}> |
| | | <TextInput source="endpoint" label="SSE Endpoint" fullWidth disabled={readOnly} /> |
| | | <TextInput source="endpoint" label="ai.mcp.fields.endpoint" fullWidth disabled={readOnly} /> |
| | | </Grid> |
| | | <Grid item xs={12}> |
| | | <TextInput source="headersJson" label="Headers JSON" fullWidth multiline minRows={4} disabled={readOnly} /> |
| | | <TextInput source="headersJson" label="ai.mcp.fields.headersJson" fullWidth multiline minRows={4} disabled={readOnly} /> |
| | | </Grid> |
| | | </> |
| | | )} |
| | |
| | | <TextInput source="command" label="ai.mcp.fields.command" fullWidth disabled={readOnly} /> |
| | | </Grid> |
| | | <Grid item xs={12}> |
| | | <TextInput source="argsJson" label="Args JSON" fullWidth multiline minRows={4} disabled={readOnly} /> |
| | | <TextInput source="argsJson" label="ai.mcp.fields.argsJson" fullWidth multiline minRows={4} disabled={readOnly} /> |
| | | </Grid> |
| | | <Grid item xs={12}> |
| | | <TextInput source="envJson" label="Env JSON" fullWidth multiline minRows={4} disabled={readOnly} /> |
| | | <TextInput source="envJson" label="ai.mcp.fields.envJson" fullWidth multiline minRows={4} disabled={readOnly} /> |
| | | </Grid> |
| | | </> |
| | | )} |
| | |
| | | )} |
| | | </FormDataConsumer> |
| | | <Grid item xs={12} md={4}> |
| | | <NumberInput source="requestTimeoutMs" label="Timeout(ms)" fullWidth disabled={readOnly} /> |
| | | <NumberInput source="requestTimeoutMs" label="ai.mcp.fields.requestTimeoutMs" fullWidth disabled={readOnly} /> |
| | | </Grid> |
| | | <Grid item xs={12} md={4}> |
| | | <NumberInput source="sort" label="ai.mcp.fields.sort" fullWidth disabled={readOnly} /> |
| | |
| | | </Stack> |
| | | <Stack direction="row" spacing={1} flexWrap="wrap" useFlexGap mt={1.5}> |
| | | <Chip size="small" variant="outlined" label={translate("ai.mcp.list.sortValue", { value: record.sort ?? 0 })} /> |
| | | <Chip size="small" variant="outlined" label={`${record.requestTimeoutMs ?? "--"} ms`} /> |
| | | <Chip size="small" variant="outlined" label={`Init ${record.lastInitElapsedMs ?? "--"} ms`} /> |
| | | <Chip |
| | | size="small" |
| | | variant="outlined" |
| | | label={translate("ai.mcp.list.timeoutValue", { value: record.requestTimeoutMs ?? "--" })} |
| | | /> |
| | | <Chip |
| | | size="small" |
| | | variant="outlined" |
| | | label={translate("ai.mcp.list.initValue", { value: record.lastInitElapsedMs ?? "--" })} |
| | | /> |
| | | </Stack> |
| | | <Divider sx={{ my: 1.5 }} /> |
| | | <Typography variant="caption" color="text.secondary">{translate("ai.common.target")}</Typography> |
| | |
| | | {!!connectivity && ( |
| | | <Alert severity={resolveConnectivitySeverity(connectivity.healthStatus)} sx={{ mb: 2 }}> |
| | | {connectivity.message} |
| | | {connectivity.initElapsedMs != null && ` · Init ${connectivity.initElapsedMs} ms`} |
| | | {connectivity.toolCount != null && ` · Tools ${connectivity.toolCount}`} |
| | | {connectivity.initElapsedMs != null && ` · ${translate("ai.mcp.tools.connectivityInit", { value: connectivity.initElapsedMs })}`} |
| | | {connectivity.toolCount != null && ` · ${translate("ai.mcp.tools.connectivityToolCount", { count: connectivity.toolCount })}`} |
| | | {connectivity.testedAt && ` · ${connectivity.testedAt}`} |
| | | </Alert> |
| | | )} |
| | |
| | | {translate("ai.mcp.tools.fieldCount", { count: schemaInfo.fields.length })} |
| | | </Typography> |
| | | <Typography variant="caption" color="text.secondary"> |
| | | {tool.returnDirect ? "returnDirect" : "normal"} |
| | | {translate(tool.returnDirect ? "ai.mcp.tools.returnDirect" : "ai.mcp.tools.normal")} |
| | | </Typography> |
| | | </Stack> |
| | | </Stack> |
| | |
| | | </Stack> |
| | | <Divider sx={{ my: 1.5 }} /> |
| | | <Typography variant="body2" color="text.secondary"> |
| | | Base URL |
| | | {translate("ai.param.fields.baseUrl")} |
| | | </Typography> |
| | | <Typography variant="body2" sx={{ mb: 1.5, wordBreak: "break-all" }}> |
| | | {truncateText(record.baseUrl, 120)} |
| | | </Typography> |
| | | <Grid container spacing={1}> |
| | | <Grid item xs={6}> |
| | | <Typography variant="caption" color="text.secondary">Temperature</Typography> |
| | | <Typography variant="caption" color="text.secondary">{translate("ai.param.fields.temperature")}</Typography> |
| | | <Typography variant="body2">{record.temperature ?? "--"}</Typography> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <Typography variant="caption" color="text.secondary">Top P</Typography> |
| | | <Typography variant="caption" color="text.secondary">{translate("ai.param.fields.topP")}</Typography> |
| | | <Typography variant="body2">{record.topP ?? "--"}</Typography> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <Typography variant="caption" color="text.secondary">Max Tokens</Typography> |
| | | <Typography variant="caption" color="text.secondary">{translate("ai.param.fields.maxTokens")}</Typography> |
| | | <Typography variant="body2">{record.maxTokens ?? "--"}</Typography> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <Typography variant="caption" color="text.secondary">Timeout</Typography> |
| | | <Typography variant="caption" color="text.secondary">{translate("ai.param.fields.timeoutMs")}</Typography> |
| | | <Typography variant="body2">{record.timeoutMs ?? "--"} ms</Typography> |
| | | </Grid> |
| | | </Grid> |