@bd7pil/opencode-deep-memory 0.8.4 → 0.8.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/dist/index.js CHANGED
@@ -15534,7 +15534,13 @@ function compressFileRead(output) {
15534
15534
  }
15535
15535
  function compressBash(output) {
15536
15536
  const lines = output.split("\n");
15537
- if (lines.length <= 50) return output;
15537
+ if (lines.length <= 50 && output.length <= 5e3) return output;
15538
+ if (lines.length <= 50) {
15539
+ if (detectContentType(output) === "json") {
15540
+ return compressJsonOutput(output);
15541
+ }
15542
+ return lines.map((l) => l.length > MAX_LINE_LENGTH ? l.slice(0, MAX_LINE_LENGTH) + "..." : l).join("\n");
15543
+ }
15538
15544
  const errorLines = lines.filter((l) => /error|fail|exception|fatal|panic/i.test(l)).slice(0, 5);
15539
15545
  const tail = lines.slice(-30);
15540
15546
  return [...errorLines, ...tail].join("\n");