fix(settings): MCP 卡片与编辑器以真实配置为准,预设只做缺省值

本地形态的 MCP 地址是 127.0.0.1:8091~8094,容器形态是 mcp_*:3000;
之前内置服务卡和编辑框一律显示 presets.json 里的地址,且 url 输入框锁只读,
于是出现「显示容器地址 + 亮着已连接」的矛盾,用户也改不动真实地址。

- 卡片地址改为读 config(s.url),与预设不同时标「(自定义)」
- 编辑框预填 当前配置 > 预设缺省,name 仍只读、url 放开
- 保存时内置服务也按需写 url(name/mode 仍是契约)
This commit is contained in:
2026-11-11 16:44:45 +08:00
parent 50c53fd885
commit 59994b688a
3 changed files with 23 additions and 16 deletions
+1 -1
View File
@@ -1370,7 +1370,7 @@ label.icon-btn { cursor: pointer; }
.modal .mpe-unit { position: relative; flex: none; width: 118px; }
.modal .mpe-unit input { width: 100%; margin: 0; padding: 8px 30px 8px 10px; }
.modal .mpe-unit i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11.5px; color: var(--gray-light); pointer-events: none; }
/* 预设模式下 name/url 是契约值(只读),压暗以区别于可编辑输入框 */
/* 预设模式下 name 是契约值(只读),压暗以区别于可编辑输入框 */
.modal input[readonly] { background: #f1f3f7; color: var(--gray); }
.modal .mpe-ck { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--gray); }
.modal .mpe-ck input { width: 15px; height: 15px; padding: 0; margin: 0; border: none; background: none; accent-color: var(--active); cursor: pointer; }