Files
goodbuddy/docs/features/model-connections/ui-design.md
T
mesalogo c037d7fb20 fix: complete runtime and workspace workflows
Restore Ask workspace reads and output paging without granting write access,
and let programming Subagents reuse their parent's browser page. Allocate
browser resources only when used, keep Agent pages aligned with workbar tabs,
recover released bindings, and remove unused automatic screenshot work.

Preserve inherited Runtime selections during remote usage persistence and
manual compression. Keep viable channel model fallbacks, display the actual
scheduled-task mode and Harness model source, and avoid rediscovery delays
when calling healthy MCP tools. Fix directory/history refresh, case-only
renames, rename-aware commit diffs, and FastGPT probe success reporting.

Add regression coverage and align feature documentation. The Agent-side
connection timeout fix requires deploying an updated Agent; existing Ask
read-only and Execute authorization boundaries remain unchanged.

Final validation: 3839 tests passed, 66 skipped; typecheck, lint, development
build, and diff checks passed. Isolated Electron UI/MCP workflows passed with
a loopback model fixture. Current-source Linux x64 Host checks passed with
three successful real model requests. Chromium loadURL rejection was not
reproduced in the UI; released-binding recovery has automated coverage.

Release note: 修复 Ask 读取项目文件、浏览器页面显示与恢复、文件管理及模型配置跟随中的不一致,并减少无用截图和 MCP 等待。定时任务显示实际工作模式,远程会话可正常保存继承 Runtime 的用量;远端连接超时修复需更新 Agent 后生效。
2026-09-10 12:48:30 +08:00

3.1 KiB

模型连接请求定制 UI 设计

本文件定义模型连接请求定制的界面行为。全局视觉、表单和无障碍规则继续以 UI-DESIGN.md 为准。

信息架构

“自定义请求头”和“自定义请求体”位于当前 LLM 连接详情的最底部、连接兼容性摘要之前。 它们不新增页签、弹窗或高级模式。每个编辑器使用可纵向调整大小的等宽文本域,默认值为 {}。

编辑与保存

  • 请求头接受 JSON 对象,所有值必须是字符串。
  • 请求体接受 JSON 对象,值必须是有界、可序列化的 JSON。
  • 用户输入在编辑时原样保留。JSON 语法、类型、大小或保留字段无效时,文本域显示 aria-invalid 和就地错误;点击保存时阻止写入,并在现有设置错误区域显示对应连接。
  • 保存成功后,编辑器使用两个空格缩进重新格式化已保存对象。
  • 新连接从两个空对象开始。

兼容性说明

请求头说明明确列出直连、Continue、OpenCode 和 DeepSeek Harness 在原生支持范围内使用 该值。请求体说明明确列出直连、Continue 和受管远程 OpenCode 支持,并说明本地 OpenCode 与 DeepSeek Harness 不使用该值。

同一区域还必须说明:

  • Runtime、协议和认证生成的字段优先。
  • 请求体只做顶层浅合并,不递归合并对象。
  • 自定义值按普通连接设置保存,不能用于保存 API Key 或其他密钥。

无障碍与键盘

  • 每个文本域有稳定的可访问名称,并通过 aria-describedby 关联兼容性说明。
  • 无效状态不能只依赖颜色,必须同时提供错误文字和 aria-invalid。
  • 文本域遵循标准键盘编辑、选择、复制和粘贴行为;保存继续使用设置页唯一的主保存操作。
  • 焦点边框、字体、间距、颜色和深浅主题全部复用全局语义令牌。

Harness 模型来源展示

DeepSeek Harness 的 platform 选项命名为“管理员环境优先,回退 GoodBuddy 兼容连接”, 不能沿用 OpenCode/Continue 的“Runtime 自有配置”标签。来源规则以 Harness 模型配置为准。 帮助文字与选择器通过 aria-describedby 关联,并明确此选项不加载用户 profile 或 配置文件;无兼容 GoodBuddy 连接时仍可选择管理员环境来源。

概览使用 Main 提供的平台来源投影, 明确显示实际管理员预置模型,或“未配置完整的管理员预置”及已保存兼容回退的名称与模型; 没有可解析连接时显示明确空状态,但保留 platform 选项。不得从通用模型名称或 credentialSource 猜测管理员来源,也不得显示密钥或读取 Main 环境。

没有管理员覆盖且草稿兼容候选发生变化时,额外显示“草稿兼容候选(未保存)”,保留实际 已保存来源;草稿失去兼容连接时也明确说明。管理员覆盖生效时不把草稿回退显示为实际模型。 保存完成后以 Main 重新解析的投影刷新概览。