pi-codex-tools 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ This project follows the spirit of [Keep a Changelog](https://keepachangelog.com
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.3] - 2026-08-06
10
+
11
+ ### Fixed
12
+
13
+ - Trim patch header paths in the streaming preview so whitespace-padded headers coalesce and render the same way execution does (it trims via `headerPath`).
14
+
9
15
  ## [0.1.2] - 2026-08-06
10
16
 
11
17
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-codex-tools",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Codex-compatible apply_patch tooling for Pi's grammar-capable OpenAI models.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -92,7 +92,9 @@ export function scanPatchPreview(input: string): PatchPreview {
92
92
  ? "delete"
93
93
  : "update";
94
94
  const prefix = kind === "add" ? FILE_ADD : kind === "delete" ? FILE_DELETE : FILE_UPDATE;
95
- const path = line.slice(prefix.length);
95
+ // Match parseApplyPatch's headerPath(), which trims paths, so whitespace-padded headers
96
+ // coalesce and render the same way execution sees them.
97
+ const path = line.slice(prefix.length).trim();
96
98
  const existing = filesByPath.get(path);
97
99
  if (existing) {
98
100
  // Execution coalesces multiple hunks for the same path; the preview must too, otherwise