← 返回更新日志

Pi v0.77.0

2026-05-28 · GitHub 原文
### 新功能 - **Claude Opus 4.8 支持** - 添加了 Anthropic Claude Opus 4.8 的元数据,并更新了 Opus 自适应思考的覆盖范围。 - **选择性禁用工具** - `--exclude-tools` / `-xt` 可禁用特定的内置、扩展或自定义工具,同时保留其余工具可用。详见 [工具选项](https://github.com/earendil-works/pi/blob/v0.77.0/packages/coding-agent/docs/usage.md#tool-options)。 - **无头模式 Codex 订阅登录** - `/login` 支持使用设备码认证进行 ChatGPT Plus/Pro Codex 订阅登录。详见 [订阅](https://github.com/earendil-works/pi/blob/v0.77.0/packages/coding-agent/docs/providers.md#subscriptions) 和 [OpenAI Codex](https://github.com/earendil-works/pi/blob/v0.77.0/packages/coding-agent/docs/providers.md#openai-codex)。 - **流式感知扩展输入** - 扩展程序可通过 `InputEvent.streamingBehavior` 区分空闲提示词、流式处理中的转向指令以及排队中的后续提示。详见 [输入事件](https://github.com/earendil-works/pi/blob/v0.77.0/packages/coding-agent/docs/extensions.md#input-events)。 ### 新增 - 新增 `--exclude-tools` / `-xt` 参数,用于禁用特定的内置、扩展或自定义工具,同时保留其余工具可用([#5109](https://github.com/earendil-works/pi/issues/5109))。 - 新增 OpenAI Codex 订阅的设备码登录功能,作为可选的无头模式替代方案,同时默认保留浏览器登录方式([#4911](https://github.com/earendil-works/pi/pull/4911) by [@vegarsti](https://github.com/vegarsti))。 - 在扩展输入事件中新增 `streamingBehavior`,使扩展程序能够区分空闲提示词、流式处理中的转向指令以及排队中的后续提示([#5107](https://github.com/earendil-works/pi/pull/5107) by [@DanielThomas](https://github.com/DanielThomas))。 - 为 Anthropic 新增 Claude Opus 4.8 模型元数据,并更新 Opus 自适应思考覆盖范围以使用它。 ### 修复 - 修复启动时间输出,使 `readPipedStdin` 不再包含 `createAgentSessionRuntime` 的工作耗时([#4829](https://github.com/earendil-works/pi/issues/4829))。 - 修复 OpenRouter DeepSeek V4 `xhigh` 推理元数据,以保留 OpenRouter 的原生努力级别,而非发送 DeepSeek 的 `max` 级别([#4801](https://github.com/earendil-works/pi/issues/4801))。 - 修复自定义会话目录问题,使当前文件夹的恢复/继续查找保持在活动 cwd 范围内,而所有会话列表则覆盖自定义目录。 - 修复 SIGTERM/SIGHUP 退出时的扩展 `session_shutdown` 清理及终端恢复:信号触发的关机现在会在任何终端写入前触发 `session_shutdown`,且 SIGHUP 不再硬退出,因此即使终端已消失,扩展资源(如 socket)也能被正确释放([#5080](https://github.com/earendil-works/pi/issues/5080))。 - 修复键盘协议协商,忽略不匹配或延迟的终端响应,避免误判为 Kitty 键盘协议([#5091](https://github.com/earendil-works/pi/pull/5091) by [@mitsuhiko](https://github.com/mitsuhiko))。 - 通过更新原生剪贴板插件至 napi-rs 3.x,修复 MSYS2 ucrt64 Node.js 环境下的 Windows 启动崩溃问题([#5028](https://github.com/earendil-works/pi/issues/5028))。 - 修复 API 密钥和 Header 配置解析,将纯字符串视为字面量,支持 `$ENV_VAR` / `${ENV_VAR}` 插值及 `$!` 感叹号转义,并要求配置文件使用显式环境变量语法,避免 Windows 不区分大小写的环境变量匹配破坏字面量密钥([#5095](https://github.com/earendil-works/pi/issues/5095))。 - 修复会话销毁逻辑,中止正在进行的代理、压缩、分支摘要、重试和 bash 任务([#5029](https://github.com/earendil-works/pi/pull/5029) by [@TerminallyChilI](https://github.com/TerminallyChilI))。 - 修复 `pi.getAllTools()`,暴露每个工具的 `promptGuidelines`,以满足需要按工具归属指南的扩展程序需求([#4879](https://github.com/earendil-works/pi/issues/4879))。 - 修复从 Anthropic 扩展思考会话切换后 OpenAI Codex Responses 的重播问题,通过为转换后的思考/文本块生成唯一的回退消息项 ID([#5148](https://github.com/earendil-works/pi/issues/5148))。 - 修复 Anthropic 兼容的重播功能,针对返回空思考签名的提供商,新增可选的 `allowEmptySignature` 兼容标志([#4464](https://github.com/earendil-works/pi/issues/4464))。 - 修复 OpenAI 和 OpenRouter GPT-5.5 Pro 思考级别元数据,仅暴露支持的 medium、high 和 xhigh 级别。 - 修复 OpenCode Go Kimi K2.6 关闭思考的请求,使其正确发送 `thinking: "none"`([#5078](https://github.com/earendil-works/pi/issues/5078))。 - 修复 Xiaomi Token Plan 模型元数据,省略不支持的 `mimo-v2-flash` 变体([#5075](https://github.com/earendil-works/pi/issues/5075))。 - 修复由 `agent_end` 扩展处理器排队的后续提示消息,使其在代理变为空闲前排空([#5115](https://github.com/earendil-works/pi/pull/5115) by [@DanielThomas](https://github.com/DanielThomas))。 - 修复扩展输入事件,仅对实际在流式处理期间排队的提示词报告 `streamingBehavior`([#5107](https://github.com/earendil-works/pi/pull/5107) by [@DanielThomas](https://github.com/DanielThomas))。 - 修复系统提示词中的工具选择引导,避免优先推荐不可用的文件探索工具([#5132](https://github.com/earendil-works/pi/issues/5132))。 - 修复 fenced `diff` 代码块及其他 highlight.js 作用域,在替换为 `cli-highlight` 后保持主题感知的语法高亮颜色([#5092](https://github.com/earendil-works/pi/issues/5092))。