← 返回更新日志

Pi v0.71.0

2026-04-30 · GitHub 原文
### 破坏性变更 - 移除了内置的 Google Gemini CLI 和 Google Antigravity 支持。使用这些提供商的现有配置必须切换到其他支持的提供商。 ### 新功能 - 支持 Cloudflare AI Gateway 提供商,配置 `CLOUDFLARE_API_KEY`/`CLOUDFLARE_ACCOUNT_ID`/`CLOUDFLARE_GATEWAY_ID`,支持默认模型解析和 `/login` 显示。详见 [docs/providers.md#cloudflare-ai-gateway](docs/providers.md#cloudflare-ai-gateway)。([#3856](https://github.com/badlogic/pi-mono/pull/3856) by [@mchenco](https://github.com/mchenco))。 - 支持 Moonshot AI 提供商,配置 `MOONSHOT_API_KEY`,支持默认模型解析和 `/login` 显示。 - 内置支持 Mistral Medium 3.5 模型。详见 [docs/providers.md#api-keys](docs/providers.md#api-keys)。([#4009](https://github.com/badlogic/pi-mono/pull/4009) by [@technocidal](https://github.com/technocidal))。 - 扩展 API 现在可以替换已完成的 `message_end` 消息,通过 `ctx.ui.getEditorComponent()` 包装自定义编辑器工厂,并监听思考级别变化。详见 [docs/extensions.md#message_start--message_update--message_end](docs/extensions.md#message_start--message_update--message_end)、[docs/extensions.md#widgets-status-and-footer](docs/extensions.md#widgets-status-and-footer) 和 [docs/extensions.md#thinking_level_select](docs/extensions.md#thinking_level_select)。 - `PI_CODING_AGENT_SESSION_DIR` 用于从环境变量配置会话存储。详见 [docs/usage.md#environment-variables](docs/usage.md#environment-variables)。 ### 新增 - 将 Cloudflare AI Gateway 作为内置提供商添加,支持 `CLOUDFLARE_API_KEY`/`CLOUDFLARE_ACCOUNT_ID`/`CLOUDFLARE_GATEWAY_ID` 配置、默认模型解析、`/login` 显示支持及提供商文档 ([#3856](https://github.com/badlogic/pi-mono/pull/3856) by [@mchenco](https://github.com/mchenco))。 - 将 Moonshot AI 作为内置提供商添加,支持 `MOONSHOT_API_KEY` 配置、默认模型解析及 `/login` 显示支持。 - 通过 `@mariozechner/pi-ai` 添加内置支持 Mistral Medium 3.5 模型 ([#4009](https://github.com/badlogic/pi-mono/pull/4009) by [@technocidal](https://github.com/technocidal))。 - 在助手消息中添加路由 OpenAI 兼容响应模型元数据,以便 OpenRouter 等提供商可以暴露实际使用的具体模型 ([#3968](https://github.com/badlogic/pi-mono/pull/3968) by [@purrgrammer](https://github.com/purrgrammer))。 - 添加 `PI_CODING_AGENT_SESSION_DIR` 作为 `--session-dir` 的环境变量等效项 ([#4027](https://github.com/badlogic/pi-mono/issues/4027))。 - 添加 `message_end` 扩展结果支持以替换已完成的消息,使扩展能够覆盖助手使用成本 ([#3982](https://github.com/badlogic/pi-mono/issues/3982))。 - 为 `pi.registerProvider()` 添加顶层 `name` 支持,使扩展注册的提供商能在 `/login` 中显示友好名称 ([#3956](https://github.com/badlogic/pi-mono/issues/3956))。 - 添加 `ctx.ui.getEditorComponent()`,使扩展能够包装当前配置的自定义编辑器工厂 ([#3935](https://github.com/badlogic/pi-mono/issues/3935))。 - 添加 `thinking_level_select` 扩展事件用于监听思考级别变化 ([#3888](https://github.com/badlogic/pi-mono/issues/3888))。 ### 修复 - 修复了通过 WSL 粘贴剪贴板图片的问题,改为直接传递 PowerShell 保存路径,而非通过自定义环境变量([#2469](https://github.com/badlogic/pi-mono/issues/2469))。 - 修复了 Google Vertex Gemini 3 对未签名工具调用的工具调用重放问题([#4032](https://github.com/badlogic/pi-mono/issues/4032))。 - 修复了交互式扩展确认后,被阻止的 `edit` 工具结果重复显示两次拒绝原因的问题([#3830](https://github.com/badlogic/pi-mono/issues/3830))。 - 修复了扩展触发的思考级别更改立即刷新交互式编辑器边框的问题([#3888](https://github.com/badlogic/pi-mono/issues/3888))。 - 修复了 coding-agent README 中的“参见”链接,使其指向 `@mariozechner/pi-agent-core`([#4023](https://github.com/badlogic/pi-mono/issues/4023))。 - 修复了 `grep` 和 `find` 工具在类标志搜索模式下的参数注入问题([#4018](https://github.com/badlogic/pi-mono/issues/4018))。 - 修复了 Windows 上的 PowerShell shell 命令输出问题,改为仅在 Unix 系统上生成分离进程([#4013](https://github.com/badlogic/pi-mono/pull/4013),由 [@picasso250](https://github.com/picasso250) 贡献)。 - 修复了当 `npmCommand` 配置为使用 Bun 时,Bun 包管理器无法正确发现 `node_modules` 的问题([#3998](https://github.com/badlogic/pi-mono/pull/3998),由 [@thirtythreeforty](https://github.com/thirtythreeforty) 贡献)。 - 修复了 `edit` 和 `edit-preview` 访问失败时未能正确报告文件系统错误的问题([#3955](https://github.com/badlogic/pi-mono/pull/3955),由 [@rwachtler](https://github.com/rwachtler) 贡献)。 - 修复了 `ProcessTerminal` 的尺寸计算,使其优先使用 `COLUMNS` 和 `LINES` 环境变量,而非直接回退到 80x24([#4004](https://github.com/badlogic/pi-mono/issues/4004))。 - 升级 `@anthropic-ai/sdk` 以解决 GHSA-p7fg-763f-g4gf 审计发现的问题([#3992](https://github.com/badlogic/pi-mono/issues/3992))。 - 升级 `@mariozechner/clipboard` 至已签名发布版本,以防止启用信任策略的包管理器拒绝安装([#3946](https://github.com/badlogic/pi-mono/issues/3946))。 - 修复了项目上下文发现机制,使其在加载 `AGENTS.md` 的同时也加载 `AGENTS.MD` 文件([#3949](https://github.com/badlogic/pi-mono/issues/3949))。 - 修复了 `/handoff` 命令,使其使用压缩后的会话上下文,而非压缩前的原始消息([#3945](https://github.com/badlogic/pi-mono/issues/3945))。 - 修复了 DeepSeek V4 Flash 的 `xhigh` 思考模式支持,使请求正确映射到 DeepSeek 的 `max` 推理强度([#3944](https://github.com/badlogic/pi-mono/issues/3944))。 - 修复了 Anthropic 流式响应在 `message_stop` 之前结束的情况,将其正确识别为错误而非成功的部分响应([#3936](https://github.com/badlogic/pi-mono/issues/3936))。 - 修复了非直接 DeepSeek 提供商环境下,生成的 OpenAI 兼容 DeepSeek V4 推理功能的兼容性问题([#3940](https://github.com/badlogic/pi-mono/issues/3940))。 - 修复了空闲状态下的后续提交,使其像正常消息提交一样清空编辑器([#3926](https://github.com/badlogic/pi-mono/issues/3926))。 - 修复了编辑器中泰语 Sara Am 和老挝语 AM 元音字符的渲染伪影问题([#3904](https://github.com/badlogic/pi-mono/issues/3904))。 - 修复了 DeepSeek V4 Flash 和 V4 Pro 的定价元数据,使其与当前官方费率一致([#3910](https://github.com/badlogic/pi-mono/issues/3910))。 - 更新沙箱扩展示例的锁文件,以解决存在漏洞的 `lodash-es` 传递依赖([#3901](https://github.com/badlogic/pi-mono/issues/3901))。 - 修复了 DeepSeek 提示词缓存命中统计,使其能从 OpenAI 兼容的用量响应中正确追踪([#3880](https://github.com/badlogic/pi-mono/issues/3880))。 ### 已移除 - 移除了已停用的 Qwen CLI OAuth 自定义提供商扩展示例([#3832](https://github.com/badlogic/pi-mono/pull/3832),由 [@4h9fbZ](https://github.com/4h9fbZ) 贡献)。 - 移除了 Google Gemini CLI 和 Google Antigravity 的内置登录、默认模型、文档及示例扩展支持。