### 新增
- 在 ExtensionAPI 中添加 `pi.setLabel(entryId, label)`,允许扩展为每个条目设置标签 ([#806](https://github.com/badlogic/pi-mono/issues/806))
- 导出 `keyHint`、`appKeyHint`、`editorKey`、`appKey`、`rawKeyHint`,供扩展统一格式化快捷键提示 ([#802](https://github.com/badlogic/pi-mono/pull/802) by [@dannote](https://github.com/dannote))
- 从包索引导出 `VERSION` 并更新了 custom-header 示例。 ([#798](https://github.com/badlogic/pi-mono/pull/798) by [@tallshort](https://github.com/tallshort))
- 新增 `showHardwareCursor` 设置,可在支持输入法编辑器 (IME) 定位光标的同时控制其可见性。 ([#800](https://github.com/badlogic/pi-mono/pull/800) by [@ghoulr](https://github.com/ghoulr))
- 在交互式编辑器中新增类 Emacs 的剪贴板环(kill ring)编辑功能,包含 yank 和 yank-pop 快捷键,并支持传统的 Alt+字母 处理及 Alt+D 向前删除单词功能。 ([#810](https://github.com/badlogic/pi-mono/pull/810) by [@Perlence](https://github.com/Perlence))
- 在扩展上下文中新增 `ctx.compact()` 和 `ctx.getContextUsage()`,用于以编程方式执行上下文压缩及使用量检查。
- 补充了交互模式下向前删除单词及剪贴板环快捷键的文档。 ([#810](https://github.com/badlogic/pi-mono/pull/810) by [@Perlence](https://github.com/Perlence))
### 更改
- 更新默认系统提示词措辞,以明确 pi 框架及文档的适用范围。
- 简化 Codex 系统提示词处理逻辑,改为直接对 Codex 指令使用默认系统提示词。
### 修复
- 修复在 ESM 上下文中因“require is not defined”错误导致 photon 模块无法加载的问题 ([#795](https://github.com/badlogic/pi-mono/pull/795) by [@dannote](https://github.com/dannote))
- 修复扩展触发压缩时压缩 UI 未显示的问题。
- 修复因出错助手消息后的孤立工具结果导致 Codex API 错误的问题。当助手消息的 `stopReason` 为 `"error"` 时,其工具调用现将被排除在待处理工具跟踪之外,从而防止为将被特定提供商转换器丢弃的调用生成合成工具结果。 ([#812](https://github.com/badlogic/pi-mono/issues/812))
- 修复 Bedrock Claude 的 `max_tokens` 处理逻辑,确保其始终超过思考预算 token 数,从而防止压缩失败。 ([#797](https://github.com/badlogic/pi-mono/pull/797) by [@pjtf93](https://github.com/pjtf93))
- 修复 Claude Code 工具名称规范化逻辑,使其与工具列表进行不区分大小写的匹配,并移除无效映射。
### 移除
- 从 read 工具中移除了 `pi-internal://` 路径解析功能。
### Added
- `pi.setLabel(entryId, label)` in ExtensionAPI for setting per-entry labels from extensions ([#806](https://github.com/badlogic/pi-mono/issues/806))
- Export `keyHint`, `appKeyHint`, `editorKey`, `appKey`, `rawKeyHint` for extensions to format keybinding hints consistently ([#802](https://github.com/badlogic/pi-mono/pull/802) by [@dannote](https://github.com/dannote))
- Exported `VERSION` from the package index and updated the custom-header example. ([#798](https://github.com/badlogic/pi-mono/pull/798) by [@tallshort](https://github.com/tallshort))
- Added `showHardwareCursor` setting to control cursor visibility while still positioning it for IME support. ([#800](https://github.com/badlogic/pi-mono/pull/800) by [@ghoulr](https://github.com/ghoulr))
- Added Emacs-style kill ring editing with yank and yank-pop keybindings, plus legacy Alt+letter handling and Alt+D delete word forward support in the interactive editor. ([#810](https://github.com/badlogic/pi-mono/pull/810) by [@Perlence](https://github.com/Perlence))
- Added `ctx.compact()` and `ctx.getContextUsage()` to extension contexts for programmatic compaction and context usage checks.
- Added documentation for delete word forward and kill ring keybindings in interactive mode. ([#810](https://github.com/badlogic/pi-mono/pull/810) by [@Perlence](https://github.com/Perlence))
### Changed
- Updated the default system prompt wording to clarify the pi harness and documentation scope.
- Simplified Codex system prompt handling to use the default system prompt directly for Codex instructions.
### Fixed
- Fixed photon module failing to load in ESM context with "require is not defined" error ([#795](https://github.com/badlogic/pi-mono/pull/795) by [@dannote](https://github.com/dannote))
- Fixed compaction UI not showing when extensions trigger compaction.
- Fixed orphaned tool results after errored assistant messages causing Codex API errors. When an assistant message has `stopReason: "error"`, its tool calls are now excluded from pending tool tracking, preventing synthetic tool results from being generated for calls that will be dropped by provider-specific converters. ([#812](https://github.com/badlogic/pi-mono/issues/812))
- Fixed Bedrock Claude max_tokens handling to always exceed thinking budget tokens, preventing compaction failures. ([#797](https://github.com/badlogic/pi-mono/pull/797) by [@pjtf93](https://github.com/pjtf93))
- Fixed Claude Code tool name normalization to match the Claude Code tool list case-insensitively and remove invalid mappings.
### Removed
- Removed `pi-internal://` path resolution from the read tool.