pi-goosedump 0.9.6 → 0.9.8
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 +1 -1
- package/index.ts +9 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ goose_compact({ keep: 2 })
|
|
|
48
48
|
scrollable panel; press enter to expand an entry to its full content.
|
|
49
49
|
- **`/goose-compact [keep:N]`:** compact now with goosedump. With `keep:N`
|
|
50
50
|
(N ≥ 1) the last N user turns stay verbatim and everything before is
|
|
51
|
-
summarized; with no argument goosedump summarizes up to Pi's cut.
|
|
51
|
+
summarized; with no argument goosedump summarizes up to Pi's token-based cut.
|
|
52
52
|
- **`/goose-settings`:** edit the global and project compaction settings.
|
|
53
53
|
|
|
54
54
|
## Settings
|
package/index.ts
CHANGED
|
@@ -268,6 +268,12 @@ function goosedumpUnavailableResult(): AgentToolResult<void> {
|
|
|
268
268
|
return textResult(GOOSEDUMP_UNAVAILABLE_MESSAGE);
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
+
function compactStartedMessage(keep: number | null): string {
|
|
272
|
+
return keep !== null
|
|
273
|
+
? `Compacting with goosedump; keeping the last ${keep} user turn${keep === 1 ? '' : 's'}.`
|
|
274
|
+
: "Compacting with goosedump up to Pi's token-based cut.";
|
|
275
|
+
}
|
|
276
|
+
|
|
271
277
|
function runGoosedump(args: string[]): string {
|
|
272
278
|
try {
|
|
273
279
|
return execFileSync('node', [resolveGoosedumpBinary(), ...args], {
|
|
@@ -1336,11 +1342,7 @@ export function createGoosedumpIntegration(
|
|
|
1336
1342
|
if (result === 'nothing-to-compact') {
|
|
1337
1343
|
return textResult('Nothing to compact (session too small).');
|
|
1338
1344
|
}
|
|
1339
|
-
return textResult(
|
|
1340
|
-
keep !== null
|
|
1341
|
-
? `Compacting with goosedump; keeping the last ${keep} user turn${keep === 1 ? '' : 's'}.`
|
|
1342
|
-
: "Compacting with goosedump up to Pi's cut.",
|
|
1343
|
-
);
|
|
1345
|
+
return textResult(compactStartedMessage(keep));
|
|
1344
1346
|
},
|
|
1345
1347
|
}),
|
|
1346
1348
|
);
|
|
@@ -1518,6 +1520,8 @@ export function createGoosedumpIntegration(
|
|
|
1518
1520
|
ctx.ui.notify('Compaction already in progress', 'info');
|
|
1519
1521
|
} else if (result === 'nothing-to-compact') {
|
|
1520
1522
|
ctx.ui.notify('Nothing to compact (session too small)', 'info');
|
|
1523
|
+
} else {
|
|
1524
|
+
ctx.ui.notify(compactStartedMessage(keep), 'info');
|
|
1521
1525
|
}
|
|
1522
1526
|
},
|
|
1523
1527
|
});
|