pi-read-map 1.2.4 → 1.2.5

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
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.2.5] - 2026-02-15
6
+
7
+ ### Fixed
8
+
9
+ - `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.
10
+
5
11
  ## [1.2.4] - 2026-02-15
6
12
 
7
13
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-read-map",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Pi extension that adds structural file maps for large files",
5
5
  "type": "module",
6
6
  "pi": {
package/src/index.ts CHANGED
@@ -136,11 +136,14 @@ export default function piReadMapExtension(pi: ExtensionAPI): void {
136
136
  // Send pending directory listing after read-on-directory error
137
137
  const pendingLs = pendingDirectoryLs.get(event.toolCallId);
138
138
  if (pendingLs) {
139
- pi.sendMessage({
140
- customType: "directory-listing",
141
- content: `${pendingLs.path} is a directory. Here is ls:\n${pendingLs.listing}`,
142
- display: true,
143
- });
139
+ pi.sendMessage(
140
+ {
141
+ customType: "directory-listing",
142
+ content: `${pendingLs.path} is a directory. Here is ls:\n${pendingLs.listing}`,
143
+ display: true,
144
+ },
145
+ { deliverAs: "followUp" }
146
+ );
144
147
  pendingDirectoryLs.delete(event.toolCallId);
145
148
  }
146
149
 
@@ -150,12 +153,15 @@ export default function piReadMapExtension(pi: ExtensionAPI): void {
150
153
  }
151
154
 
152
155
  // Send the map as a custom message
153
- pi.sendMessage({
154
- customType: "file-map",
155
- content: pending.map,
156
- display: true,
157
- details: pending.details,
158
- });
156
+ pi.sendMessage(
157
+ {
158
+ customType: "file-map",
159
+ content: pending.map,
160
+ display: true,
161
+ details: pending.details,
162
+ },
163
+ { deliverAs: "followUp" }
164
+ );
159
165
 
160
166
  // Clean up
161
167
  pendingMaps.delete(event.toolCallId);