← 返回更新日志

Pi v0.57.1

2026-03-07 · GitHub 原文
### 新功能 - `/tree` 中新增树状分支折叠与段跳转导航功能,支持 `Ctrl+←`/`Ctrl+→` 和 `Alt+←`/`Alt+→` 快捷键,同时保留 `←`/`→` 以及 `Page Up`/`Page Down` 用于翻页。详见 [docs/tree.md](docs/tree.md) 和 [docs/keybindings.md](docs/keybindings.md)。 - 新增 `session_directory` 扩展事件,允许在会话管理器创建前自定义会话目录路径。详见 [docs/extensions.md](docs/extensions.md)。 - TUI 键位绑定系统新增数字键绑定(`0-9`),包括 `ctrl+1` 等组合键。详见 [docs/keybindings.md](docs/keybindings.md)。 ### 新增 - 为 `/tree` 添加分支折叠与段跳转导航功能,支持 `Ctrl+←`/`Ctrl+→` 和 `Alt+←`/`Alt+→`,同时保留 `←`/`→` 及 `Page Up`/`Page Down` 用于翻页([#1724](https://github.com/badlogic/pi-mono/pull/1724) by [@Perlence](https://github.com/Perlence)) - 新增 `session_directory` 扩展事件,在会话管理器创建前触发,允许扩展根据 `cwd` 及其他因素自定义会话目录路径。CLI 的 `--session-dir` 参数优先级高于扩展提供的路径([#1730](https://github.com/badlogic/pi-mono/pull/1730) by [@hjanuschka](https://github.com/hjanuschka))。 - 在键位绑定系统中加入数字键(`0-9`),支持 Kitty CSI-u 和 xterm `modifyOtherKeys` 以适配 `ctrl+1` 等绑定([#1905](https://github.com/badlogic/pi-mono/issues/1905)) ### 修复 - 修复了 HTML 导出中自定义工具折叠/展开状态的渲染问题。现在,定义了不同折叠与展开显示样式的自定义工具在导出的 HTML 中能正确渲染:当两种状态不同时显示可展开区域,仅存在展开状态时直接显示([#1934](https://github.com/badlogic/pi-mono/pull/1934) by [@aliou](https://github.com/aliou)) - 修复了修改键处理相关的 tmux 启动引导和键盘设置警告,包括提供 Ghostty `shift+enter=text:\n` 重映射指南以及 tmux `extended-keys-format` 检测([#1872](https://github.com/badlogic/pi-mono/issues/1872)) - 修复了 z.ai 上下文溢出恢复机制,使 `model_context_window_exceeded` 错误触发自动压缩,而非作为未处理的停止原因失败显示([#1937](https://github.com/badlogic/pi-mono/issues/1937)) - 修复了自动补全选择忽略已输入文本的问题:现在高亮提示会跟随用户输入的第一个前缀匹配项,且按下回车时始终选择精确匹配项([#1931](https://github.com/badlogic/pi-mono/pull/1931) by [@aliou](https://github.com/aliou)) - 修复了斜杠命令的 Tab 补全功能,使其在可用时立即打开参数补全([#1481](https://github.com/badlogic/pi-mono/pull/1481) by [@barapa](https://github.com/barapa)) - 修复了显式通过 `pi -e <path>` 加载的扩展在命令和工具冲突时优先级低于自动发现扩展的问题,现赋予 CLI 加载的扩展更高优先级([#1896](https://github.com/badlogic/pi-mono/issues/1896)) - 修复了 Windows 下 `Ctrl+G` 和 `ctx.ui.editor()` 调用外部编辑器的问题,使基于 shell 的命令(如 `EDITOR="code --wait"`)能正确运行([#1925](https://github.com/badlogic/pi-mono/issues/1925))