MCP 设置页改成内置服务引导:预设卡片 + 字段表单
- header 掩码只遮密钥类(名字 Authorization/*token*/*key*,或值 Bearer…/sk-…), base-url / model 明文回显——引导表单得看得见当前值才能改 - restoreMcpHeaders 改为按键名还原(原按出现顺序,只遮部分 header 后会张冠李戴); 补上单个 header 叶子写入的还原:原来把 ***** 直接写进 config.yml - MCP 页分「内置服务」(4 张预设卡:未配置→添加、已配置→编辑)与「其它服务」 - 弹窗预设模式:name/url 只读、mode 收敛为「预设值 / disable」、字段按 presets.fields 生成(左标签 + 右输入),隐藏 header 区;配置里历史多余的 header 保存时仍原样带上 - 超时 / 工具暴露改成左标签右控件的单行排版,ms 作输入框内后缀 - 移动端 MCP 弹窗放宽到 calc(100% - 24px),内边距收紧
This commit is contained in:
+13
-15
@@ -50,24 +50,24 @@
|
||||
{
|
||||
"key": "image_task",
|
||||
"label": "图片生成",
|
||||
"desc": "文生图 / 图生图,走任意 OpenAI 兼容的 /images/generations 与 /images/edits",
|
||||
"desc": "文生图 / 图生图",
|
||||
"url": "http://mcp_image_task:3000/mcp",
|
||||
"mode": "skill",
|
||||
"fields": [
|
||||
{
|
||||
"header": "Authorization",
|
||||
"label": "API Key",
|
||||
"label": "鉴权",
|
||||
"secret": true,
|
||||
"prefix": "Bearer ",
|
||||
"required": true,
|
||||
"placeholder": "上游的 API Key"
|
||||
"placeholder": "API Key"
|
||||
},
|
||||
{
|
||||
"header": "X-Image-Task-Base-Url",
|
||||
"label": "上游地址",
|
||||
"label": "地址",
|
||||
"required": true,
|
||||
"placeholder": "https://<host>/v1",
|
||||
"hint": "填到 /v1 即可,文生图自动补 /images/generations,图生图自动补 /images/edits"
|
||||
"hint": "OpenAI 兼容 generations / edits"
|
||||
},
|
||||
{
|
||||
"header": "X-Image-Task-Model",
|
||||
@@ -86,7 +86,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"header": "Authorization",
|
||||
"label": "API Key",
|
||||
"label": "鉴权",
|
||||
"secret": true,
|
||||
"prefix": "Bearer ",
|
||||
"required": true,
|
||||
@@ -95,38 +95,36 @@
|
||||
{
|
||||
"header": "X-Video-Task-Model",
|
||||
"label": "模型",
|
||||
"default": "cogvideox-flash",
|
||||
"hint": "留空 = cogvideox-flash"
|
||||
"default": "cogvideox-flash"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "asr",
|
||||
"label": "语音识别",
|
||||
"desc": "输入框「按住说话」与模型的 transcribe_audio 共用",
|
||||
"desc": "按住说话 / transcribe_audio",
|
||||
"url": "http://mcp_asr:3000/mcp",
|
||||
"mode": "skill",
|
||||
"fields": [
|
||||
{
|
||||
"header": "Authorization",
|
||||
"label": "API Key",
|
||||
"label": "鉴权",
|
||||
"secret": true,
|
||||
"prefix": "Bearer ",
|
||||
"placeholder": "自建免鉴权服务可留空"
|
||||
"placeholder": "支持自建免鉴权服务"
|
||||
},
|
||||
{
|
||||
"header": "X-ASR-Base-Url",
|
||||
"label": "上游地址",
|
||||
"label": "地址",
|
||||
"required": true,
|
||||
"placeholder": "https://<host>/v1",
|
||||
"hint": "任意 OpenAI 兼容的 /audio/transcriptions"
|
||||
"hint": "OpenAI 兼容的 /audio/transcriptions"
|
||||
},
|
||||
{
|
||||
"header": "X-ASR-Model",
|
||||
"label": "模型",
|
||||
"required": true,
|
||||
"default": "whisper-1",
|
||||
"placeholder": "whisper-1"
|
||||
"placeholder": "上游的模型 id"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user