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 +6 -0
- package/package.json +1 -1
- package/src/index.ts +17 -11
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
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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);
|