Skip to content

feat(editor): 新增 Pi MCP 配置支持 - #6375

Merged
t8y2 merged 2 commits into
t8y2:mainfrom
domye:feat/pi-agent
Aug 16, 2026
Merged

feat(editor): 新增 Pi MCP 配置支持#6375
t8y2 merged 2 commits into
t8y2:mainfrom
domye:feat/pi-agent

Conversation

@domye

@domye domye commented Aug 16, 2026

Copy link
Copy Markdown
Contributor
  • 在 MCP 配置页新增「Pi」配置 Tab(位于 OpenCode 之后),提供 Pi 智能体的 DBX MCP 配置示例
  • 新增 buildMcpPiConfig() 生成标准 mcpServers JSON(Pi 原生读取,无需额外 MCP 服务器插件)
  • 配置提示包含完整三步:先安装 Pi MCP 适配器插件 pi install npm:pi-mcp-adapter,再保存到 ~/.pi/agent/mcp.json(全局)或 .mcp.json(项目),最后在 Pi 中运行 /mcp 确认、/reload 生效
  • 新增中英文翻译与配置模板单测

变更说明

DBX 的 MCP 配置页此前支持 Claude Code、Cursor、TRAE、VS Code、Windsurf、Codex、OpenCode、Cherry Studio,缺少 Pi(Pi
编程助手)的接入示例。本 PR 在其后新增「Pi」Tab:

  • 配置内容与 Claude 相同格式(标准 mcpServers JSON),因为 Pi 通过内置的 pi-mcp-adapter 原生读取该格式,不需要单独的
    MCP 服务器插件;
  • 但 Pi 需要先安装适配器插件 pi install npm:pi-mcp-adapter(官方 README 安装命令),装完重启 Pi;
  • 配置落点与生效方式在提示中说明:~/.pi/agent/mcp.json(全局)或 .mcp.json(项目),/mcp 验证、/reload 生效。

变更类型

  • 新功能
  • Bug 修复
  • 性能优化
  • 代码重构
  • 文档更新
  • CI / 构建

涉及前端

  • 本 PR 涉及前端改动(MCP 配置页新增 Tab 与提示
PixPin_2026-08-16_14-25-12

验证

  • pnpm typecheck 通过
  • pnpm lint 通过(改动文件 0 警告)
  • 相关测试通过:mcpConfigTemplates.spec.ts 共 14 项全部通过(含新增 buildMcpPiConfig 用例)
  • 说明:Pi 适配器安装命令 pi install npm:pi-mcp-adapter 已与 pi-mcp-adapter 官方 README 核对一致

- 在 EditorSettingsDialog 中添加 Pi 配置标签页
- 新增 buildMcpPiConfig 函数用于生成 Pi 配置模板
- 添加中英文国际化说明文本
- 添加 Pi 配置模板的单元测试
@github-actions github-actions Bot added area/desktop Desktop application or Tauri shell enhancement New feature or request ui-change Changes user-visible interface, text, or visual assets labels Aug 16, 2026

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

维护者补丁 67f5e80e4 已推送。

根因:新增 Pi MCP 配置 Tab 后,固定数量断言仍期望 8 个 Tab,导致 frontend CI 失败。

修复:将断言同步为 9 个 Tab,不改变 Pi MCP 配置实现。

验证:MCP 配置与策略聚焦测试共 31 项通过;pnpm typecheckgit diff --check 通过。pi-mcp-adapter 是用户侧安装项,仓库未新增依赖。

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the maintainer-patched exact head 67f5e80e4; MCP regressions, typecheck, and frontend CI pass.

@t8y2
t8y2 merged commit d5f1803 into t8y2:main Aug 16, 2026
14 of 15 checks passed
@t8y2

t8y2 commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution! Merged in d5f1803, will be released in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/desktop Desktop application or Tauri shell enhancement New feature or request ui-change Changes user-visible interface, text, or visual assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants