pi-goosedump 0.12.9 → 0.12.10

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 +3 -12
  2. package/package.json +2 -2
package/dist/index.ts CHANGED
@@ -1676,14 +1676,14 @@ ${lines.join(`
1676
1676
  }
1677
1677
  }));
1678
1678
  }
1679
- function maybeAutoCompact(ctx, resumeAfter) {
1679
+ function maybeAutoCompact(ctx) {
1680
1680
  if (!goosedumpAvailable || !shouldOverrideDefaultCompaction)
1681
1681
  return;
1682
1682
  if (!counterTriggered || compactionQueued)
1683
1683
  return;
1684
1684
  if (ctx.hasPendingMessages())
1685
1685
  return;
1686
- if (!resumeAfter && !ctx.isIdle())
1686
+ if (!ctx.isIdle())
1687
1687
  return;
1688
1688
  if (!hasCompactableHistory(ctx))
1689
1689
  return;
@@ -1695,13 +1695,6 @@ ${lines.join(`
1695
1695
  compactionQueued = false;
1696
1696
  syncCompactCounters(ctx, true);
1697
1697
  updateStatus(ctx);
1698
- if (resumeAfter && !ctx.hasPendingMessages()) {
1699
- pi.sendMessage({
1700
- customType: "goosedump-autocompact-resume",
1701
- content: "The session was compacted to reduce context size. Continue the task you were working on from where you left off.",
1702
- display: false
1703
- }, { triggerTurn: true });
1704
- }
1705
1698
  },
1706
1699
  onError: (error) => {
1707
1700
  compactionQueued = false;
@@ -1722,11 +1715,9 @@ ${lines.join(`
1722
1715
  pi.on("turn_end", async (event, ctx) => {
1723
1716
  if (isCompletedAssistant(event.message))
1724
1717
  noteCompletedTurn(ctx);
1725
- if (event.toolResults.length > 0)
1726
- maybeAutoCompact(ctx, true);
1727
1718
  });
1728
1719
  pi.on("agent_settled", async (_event, ctx) => {
1729
- maybeAutoCompact(ctx, false);
1720
+ maybeAutoCompact(ctx);
1730
1721
  });
1731
1722
  pi.on("session_before_compact", async (event, ctx) => {
1732
1723
  if (!shouldOverrideDefaultCompaction || !goosedumpAvailable)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goosedump",
3
- "version": "0.12.9",
3
+ "version": "0.12.10",
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.82.1",
41
- "@jarkkojs/goosedump": "^0.12.9",
41
+ "@jarkkojs/goosedump": "^0.12.10",
42
42
  "@sinclair/typebox": "^0.34.49"
43
43
  },
44
44
  "devDependencies": {