发布日期: 2026-06-15
版本号: v0.79.4

本次更新引入了终端背景自动检测以首次运行时默认选择深色或浅色主题的功能,同时为独立二进制文件提供了SHA256校验和文件以增强下载完整性验证。在修复方面,主要解决了多个问题,包括:修正了子进程输出收集的时序问题,确保后期输出不被截断;优化了终端狭窄时的帮助文本显示;改进了信号处理以保持终端状态清理;明确了扩展文档中工具检索方法的区别;修复了文本截断和包管理相关问题,涵盖安装、更新及依赖处理;调整了部分模型提供商的费用计算和元数据设置;解决了界面渲染中涉及宽字符对齐、图像显示以及配置解析等方面的细节问题。整体更新提升了工具的稳定性、兼容性和用户体验。

更新内容 (中文)

新功能

  • 自动首次运行主题选择 - pi 在首次运行时检测终端背景色,自动默认使用 darklight 主题。参见选择主题
  • 独立二进制文件完整性校验和 - GitHub 发布资产现在包含 SHA256SUMS 文件,用于验证独立二进制文件下载。参见快速安装

新增

  • 为独立二进制文件 GitHub 发布资产添加 SHA256SUMS 完整性文件 (#5739)。
  • 新增基于终端背景的首次运行交互式主题检测 (#5385,由 @vegarsti 提交)。

修复

  • 修复 bash 工具输出收集,在子进程退出后(当后仍有派生进程写入时)继续消费 stdout/stderr,避免后期输出被截断 (#5753,由 @Mearman 提交)。
  • 修复 /tree 帮助渲染,在窄终端上显示紧凑换行控件而非截断 (#5055)。
  • 修复 SIGTERM/SIGHUP 交互式关闭,在终端清理完成前保持信号处理器已安装,防止 signal-exit 重新发送信号并使终端留在原始/Kitty 键盘模式 (#5724)。
  • 修复扩展文档,澄清 pi.getActiveTools() 返回活跃工具名称,而 pi.getAllTools() 返回工具元数据 (#5729)。
  • 修复 question 和 questionnaire 扩展示例,自动换行长提示、选项和帮助文本而非截断 (#5708,由 @xl0 提交)。
  • 修复包命令如 pi listpi installpi update,即使扩展留有后台句柄打开,完成后也能终止 (#5687)。
  • 修复 pnpm 全局安装的 pi update,当配置的 global-bin-dir 与活动的 pnpm home 不再匹配时 (#5689)。
  • 修复使用范围或标签的 npm 包规范(例如 @^1.2.7),使已安装包资源仍能加载而非被视为不匹配的精确固定版本 (#5695)。
  • 修复继承的 Anthropic 1小时提示缓存写入成本计算,将1小时缓存写入定价为输入的2倍,而非5分钟缓存写入费率 (#5738,由 @theBucky 提交)。
  • 修复继承的 GitHub Copilot Claude 自适应思考努力元数据,使其与手动检查的 Copilot 模型能力匹配 (#4637)。
  • 修复继承的 OpenCode/OpenCode Go 补全模型元数据,对于拒绝 prompt_cache_retention 的路由,省略长期保留缓存字段 (#5702)。
  • 修复继承的覆盖层合成在 CJK 全角字符上的显示,使边框在覆盖层起始于全角单元格内时保持对齐 (#5297)。
  • 修复继承的 WezTerm 在完全重绘回退期间的内联 Kitty 图像渲染,以便在绘制放置前预留图像填充行,且不导致高图像放置回退 (#5618, #4415)。
  • 修复自定义提供程序配置,使纯大写 API 密钥和头部值保持为字面量,而非被视为旧版环境变量引用;使用显式 $ENV_VAR 语法引用环境变量 (#5661)。

更新内容 (原始)

New Features

  • Automatic first-run theme selection - pi detects the terminal background on first run and defaults to the dark or light theme. See Selecting a Theme.
  • Standalone binary integrity checksums - GitHub release assets now include SHA256SUMS files for verifying standalone binary downloads. See Quickstart Install.

Added

  • Added SHA256SUMS integrity files to standalone binary GitHub release assets (#5739).
  • Added first-run interactive theme detection from the terminal background (#5385 by @vegarsti).

Fixed

  • Fixed bash tool output collection to keep draining stdout/stderr after the child exits while descendants still write, avoiding truncated late output (#5753 by @Mearman).
  • Fixed /tree help rendering to show compact wrapped controls instead of truncating them on narrow terminals (#5055).
  • Fixed SIGTERM/SIGHUP interactive shutdown to keep signal handlers installed until terminal cleanup completes, preventing signal-exit from re-sending the signal and leaving the terminal in raw/Kitty keyboard mode (#5724).
  • Fixed extensions documentation to clarify that pi.getActiveTools() returns active tool names while pi.getAllTools() returns tool metadata (#5729).
  • Fixed question and questionnaire extension examples to wrap long prompt, option, and help text instead of truncating it (#5708 by @xl0).
  • Fixed package commands such as pi list, pi install, and pi update to terminate after completing even if an extension leaves background handles open (#5687).
  • Fixed pi update for pnpm global installs whose configured global-bin-dir no longer matches the active pnpm home (#5689).
  • Fixed npm package specs that use ranges or tags (for example @^1.2.7) so installed package resources still load instead of being treated as mismatched exact pins (#5695).
  • Fixed inherited Anthropic 1-hour prompt-cache write cost accounting to price 1-hour cache writes at 2x input instead of the 5-minute cache-write rate (#5738 by @theBucky).
  • Fixed inherited GitHub Copilot Claude adaptive-thinking effort metadata to match manually checked Copilot model capabilities (#4637).
  • Fixed inherited OpenCode/OpenCode Go completion model metadata to omit long-retention cache fields for routes that reject prompt_cache_retention (#5702).
  • Fixed inherited overlay compositing over CJK wide characters so borders stay aligned when an overlay starts inside a full-width cell (#5297).
  • Fixed inherited WezTerm inline Kitty image rendering during full redraw fallbacks so image padding rows are reserved before the placement is drawn without regressing tall-image placement (#5618, #4415).
  • Fixed custom provider config so plain uppercase API key and header values remain literals instead of being treated as legacy environment references; use explicit $ENV_VAR syntax for environment variables (#5661).

下载链接