Resolve 15 shared-control, overlay and responsive-layout issues plus the MCP editor being hidden behind settings. Restore theme contrast, danger and disabled states, visible keyboard focus, and consistent Continue fields. Keep the workbar add button reachable and model protocol values readable in narrow containers.
Make nested MCP and image dialogs usable above their parents with focus restoration, keep project Escape handling within the active modal, release native browser views for overlapping help, and restore keyboard access and Escape in sandboxed HTML previews without relaxing sandbox permissions. Add unit and real Electron regression coverage and update design and validation documentation.
Release note: 修复深浅主题下控件边框、危险操作、禁用状态和键盘焦点显示不一致的问题。MCP 编辑器与图片预览可在父弹窗上正常操作,HTML 全屏预览支持键盘进入和 Escape 返回;窄工作栏的添加按钮保持可用,模型连接协议文字完整可读。
Validation: the full suite recorded 5309 passed, 3 failed and 83 skipped. The ProjectSwitcher initial-focus regression was then fixed, and App, ProjectSwitcher and overlay Electron tests passed all 331 cases. The other two HeartbeatCenter failures were reproduced on isolated HEAD 11facf0 and remain pre-existing. Typecheck and lint passed after the fix; staged whitespace checks passed. The full suite was not rerun after the focused fix.
Limits: Electron evidence is from Windows development runs, with fixtures for unrelated services and native occlusion throttling disabled in some drivers. No production build, packaging, macOS/Linux, remote Agent host or external MCP connection validation; skipped tests and the documented scaling and native-select coverage gaps remain.
模型连接请求定制
本功能负责 LLM 模型连接的自定义请求头和自定义请求体。用户可以在同一个连接中保存 Provider 要求的附加元数据;GoodBuddy 只在直连链路或 Runtime 明确原生支持的链路中应用 这些值,不为不支持的 Runtime 伪造透传能力。
文档导航
| 文档 | 权威职责 |
|---|---|
| UI 设计 | 编辑入口、校验反馈、兼容性说明和无障碍行为 |
| 技术设计 | 契约、持久化、合并优先级、Runtime 支持矩阵和验证 |
| 功能进度 | 已验证实现、剩余工作和验证证据 |
模型连接选择准确性也在本目录维护:技术设计第 8 节定义通道直连回退修复, UI 设计末节定义 Harness 来源标签和公开设置展示;Harness 的实际解析顺序由其 技术设计唯一维护。
本次改动是现有模型连接的有界扩展,不新增独立业务对象或工作流,因此不单独建立 PRD、 User Stories 和逻辑设计;本页定义产品边界,技术设计定义唯一的请求合并规则。
术语
| 术语 | 定义 |
|---|---|
| 自定义请求头 | 用户为一个 LLM 模型连接保存的附加 HTTP Header 字符串映射 |
| 自定义请求体 | 用户为一个 LLM 模型连接保存的附加 JSON 顶层字段 |
| Runtime 字段 | GoodBuddy 或 Runtime 为模型、消息、工具、流式、认证和协议生成的字段 |
| 直连 | GoodBuddy Main 直接向模型 Provider 发出请求 |
| 受管远程 OpenCode | 模型请求通过 GoodBuddy Agent 的可信模型网关发出的远程 OpenCode |
产品边界
- 两项设置都位于“设置 → 模型连接 → LLM → 连接详情”底部,以 JSON 对象编辑。
- 直连模型支持请求头和请求体,包括连接测试、文本、工具、摘要和图像生成请求。
- Continue 原生支持请求头和请求体。
- 本地 OpenCode 原生支持请求头,不使用自定义请求体。
- DeepSeek Harness 的 Pi-AI Provider 原生支持请求头,不使用自定义请求体。
- 受管远程 OpenCode 的可信模型网关支持请求头和请求体。
- 使用 Runtime 自有配置时不引用 GoodBuddy 模型连接,因此不会应用连接级请求定制。
- Runtime、协议和认证字段始终优先。用户不能用请求定制替换模型、消息、工具、流式或 认证信息。
- 自定义值作为普通连接设置保存。API Key 和其他密钥必须使用专用凭据字段,不应写入 自定义请求头或请求体。
- LLM 连接可以复制,已保存的 API Key 由 Main 进程安全复制到新连接。