claude-code-cache-fix 2.0.0-beta.2 → 2.0.0-beta.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/package.json +1 -1
- package/preload.mjs +13 -1
package/package.json
CHANGED
package/preload.mjs
CHANGED
|
@@ -1384,7 +1384,7 @@ globalThis.fetch = async function (url, options) {
|
|
|
1384
1384
|
if (block.type === "tool_result" && typeof block.content === "string" && block.content.includes("<system-reminder>")) {
|
|
1385
1385
|
let newContent = block.content;
|
|
1386
1386
|
for (let p = 0; p < smooshPatterns.length; p++) {
|
|
1387
|
-
smooshPatterns[p].lastIndex = 0;
|
|
1387
|
+
smooshPatterns[p].lastIndex = 0;
|
|
1388
1388
|
newContent = newContent.replace(smooshPatterns[p], smooshReplacements[p]);
|
|
1389
1389
|
}
|
|
1390
1390
|
if (newContent !== block.content) {
|
|
@@ -1392,6 +1392,18 @@ globalThis.fetch = async function (url, options) {
|
|
|
1392
1392
|
smooshNormalized++;
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
|
+
// Unsmooshed standalone text blocks with dynamic system-reminder content
|
|
1396
|
+
if (block.type === "text" && typeof block.text === "string" && block.text.startsWith("<system-reminder>")) {
|
|
1397
|
+
let newText = block.text;
|
|
1398
|
+
for (let p = 0; p < smooshPatterns.length; p++) {
|
|
1399
|
+
smooshPatterns[p].lastIndex = 0;
|
|
1400
|
+
newText = newText.replace(smooshPatterns[p], smooshReplacements[p]);
|
|
1401
|
+
}
|
|
1402
|
+
if (newText !== block.text) {
|
|
1403
|
+
msg.content[i] = { ...block, text: newText };
|
|
1404
|
+
smooshNormalized++;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1395
1407
|
}
|
|
1396
1408
|
}
|
|
1397
1409
|
}
|