pi-goosedump 0.12.2 → 0.12.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.
Files changed (2) hide show
  1. package/dist/index.ts +0 -26
  2. package/package.json +2 -2
package/dist/index.ts CHANGED
@@ -551,30 +551,6 @@ function piKeepRecentTokens(cwd) {
551
551
  }
552
552
  return DEFAULT_COMPACTION_SETTINGS.keepRecentTokens;
553
553
  }
554
- function piCompactionEnabled(cwd) {
555
- for (const path of [projectSettingsPath(cwd), globalSettingsPath()]) {
556
- const compaction = readJsonObject(path).compaction;
557
- if (isRecord(compaction) && typeof compaction.enabled === "boolean") {
558
- return compaction.enabled;
559
- }
560
- }
561
- return DEFAULT_COMPACTION_SETTINGS.enabled;
562
- }
563
- function piReserveTokens(cwd) {
564
- for (const path of [projectSettingsPath(cwd), globalSettingsPath()]) {
565
- const compaction = readJsonObject(path).compaction;
566
- if (isRecord(compaction) && typeof compaction.reserveTokens === "number") {
567
- return compaction.reserveTokens;
568
- }
569
- }
570
- return DEFAULT_COMPACTION_SETTINGS.reserveTokens;
571
- }
572
- function piAutoCompactionPending(ctx) {
573
- const usage = ctx.getContextUsage();
574
- if (!usage || usage.tokens === null)
575
- return false;
576
- return piCompactionEnabled(ctx.cwd) && usage.tokens > usage.contextWindow - piReserveTokens(ctx.cwd);
577
- }
578
554
  function hasCompactableHistory(ctx) {
579
555
  const branch = ctx.sessionManager.getBranch();
580
556
  if (branch.length === 0)
@@ -1656,8 +1632,6 @@ ${lines.join(`
1656
1632
  return;
1657
1633
  if (!hasCompactableHistory(ctx))
1658
1634
  return;
1659
- if (!resumeAfter && piAutoCompactionPending(ctx))
1660
- return;
1661
1635
  syncCompactCounters(ctx, true);
1662
1636
  updateStatus(ctx);
1663
1637
  compactionQueued = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goosedump",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "description": "Pi extension for goosedump-backed session-history search, entry expansion, and compaction",
5
5
  "keywords": [
6
6
  "compaction",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@earendil-works/pi-tui": "^0.78.0",
41
- "@jarkkojs/goosedump": "^0.12.2",
41
+ "@jarkkojs/goosedump": "^0.12.3",
42
42
  "@sinclair/typebox": "^0.34.49"
43
43
  },
44
44
  "devDependencies": {