@lll9p/pi-better-compaction 0.7.0 → 0.7.1
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/package.json +1 -1
- package/src/serializer.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lll9p/pi-better-compaction",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Better compaction for pi: native /responses/compact replay for OpenAI Responses APIs, plus a configurable compaction model driving pi's native summarization everywhere else.",
|
|
6
6
|
"author": "Lilin Lao",
|
package/src/serializer.ts
CHANGED
|
@@ -414,7 +414,7 @@ function serializeToolResultMessage<TApi extends Api>(
|
|
|
414
414
|
message: ToolResultMessage,
|
|
415
415
|
model: Model<TApi>,
|
|
416
416
|
): ResponsesFunctionCallOutputItem {
|
|
417
|
-
const [callId] = message.toolCallId.split("|");
|
|
417
|
+
const [callId] = (message.toolCallId ?? "").split("|");
|
|
418
418
|
const textOutput = message.content
|
|
419
419
|
.filter((item): item is TextContent => item.type === "text")
|
|
420
420
|
.map((item) => sanitizeSurrogates(item.text))
|