pi-goosedump 0.12.2 → 0.12.4

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/README.md CHANGED
@@ -79,8 +79,8 @@ Optional settings live under `goosedump` in:
79
79
  `turnsBeforeCompact` is an integer from 0 to 255. `0` disables scheduled
80
80
  compaction. The countdown is restored when a session resumes and appears in the
81
81
  footer with a status dot (green when >25% turns remain, yellow when ≤25%, red when ≤12.5%)
82
- followed by hexadecimal turn countdown: `● GD: 0A` means ten turns remain, `● GD: 00` is ready
83
- to compact, and `● GD: --` is disabled. Clearing the project value restores the
82
+ followed by hexadecimal turn countdown: `● GD:0A` means ten turns remain, `● GD:00` is ready
83
+ to compact, and `● GD:--` is disabled. Clearing the project value restores the
84
84
  global setting.
85
85
 
86
86
  ## Compaction behavior
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)
@@ -1288,7 +1264,7 @@ function createGoosedumpIntegration(options = {}) {
1288
1264
  }
1289
1265
  const dot = ctx.ui.theme.fg(dotColor, "●");
1290
1266
  const counter = active ? Math.max(0, turnsRemaining).toString(16).toUpperCase().padStart(2, "0") : "--";
1291
- const label = ctx.ui.theme.fg("text", `GD: ${counter}`);
1267
+ const label = ctx.ui.theme.fg("text", `${ctx.ui.theme.bold?.("GD") ?? "GD"}:${counter}`);
1292
1268
  ctx.ui.setStatus("goosedump", `${dot} ${label}`);
1293
1269
  }
1294
1270
  function noteCompletedTurn(ctx) {
@@ -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.4",
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.4",
42
42
  "@sinclair/typebox": "^0.34.49"
43
43
  },
44
44
  "devDependencies": {