pi-read-map
Advanced tools
+6
-0
@@ -5,2 +5,8 @@ # Changelog | ||
| ## [1.2.5] - 2026-02-15 | ||
| ### Fixed | ||
| - `sendMessage` calls in `tool_result` handler now use `deliverAs: "followUp"` instead of the default `"steer"` mode. The default `"steer"` mode interrupts streaming and skips remaining parallel tools — when multiple reads ran concurrently and one triggered a file-map or directory-listing message, the remaining tool calls were skipped, leaving `tool_use` blocks without matching `tool_result` blocks. This caused a 400 error from the Claude API on the next request. | ||
| ## [1.2.4] - 2026-02-15 | ||
@@ -7,0 +13,0 @@ |
+1
-1
| { | ||
| "name": "pi-read-map", | ||
| "version": "1.2.4", | ||
| "version": "1.2.5", | ||
| "description": "Pi extension that adds structural file maps for large files", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+17
-11
@@ -139,7 +139,10 @@ import type { ExtensionAPI, Theme } from "@mariozechner/pi-coding-agent"; | ||
| if (pendingLs) { | ||
| pi.sendMessage({ | ||
| customType: "directory-listing", | ||
| content: `${pendingLs.path} is a directory. Here is ls:\n${pendingLs.listing}`, | ||
| display: true, | ||
| }); | ||
| pi.sendMessage( | ||
| { | ||
| customType: "directory-listing", | ||
| content: `${pendingLs.path} is a directory. Here is ls:\n${pendingLs.listing}`, | ||
| display: true, | ||
| }, | ||
| { deliverAs: "followUp" } | ||
| ); | ||
| pendingDirectoryLs.delete(event.toolCallId); | ||
@@ -154,8 +157,11 @@ } | ||
| // Send the map as a custom message | ||
| pi.sendMessage({ | ||
| customType: "file-map", | ||
| content: pending.map, | ||
| display: true, | ||
| details: pending.details, | ||
| }); | ||
| pi.sendMessage( | ||
| { | ||
| customType: "file-map", | ||
| content: pending.map, | ||
| display: true, | ||
| details: pending.details, | ||
| }, | ||
| { deliverAs: "followUp" } | ||
| ); | ||
@@ -162,0 +168,0 @@ // Clean up |
215663
0.29%6832
0.09%