@aiplumber/session-recall 1.9.3 → 1.9.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/package.json +1 -1
- package/session-recall +11 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiplumber/session-recall",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
4
4
|
"description": "Pull context from previous Claude Code sessions. Sessions end, context resets - this tool lets you continue where you left off.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"session-recall": "./session-recall"
|
package/session-recall
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const VERSION = '1.9.
|
|
3
|
+
const VERSION = '1.9.5';
|
|
4
4
|
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
const path = require('path');
|
|
@@ -1341,8 +1341,9 @@ async function cmdLast(arg1, arg2, opts) {
|
|
|
1341
1341
|
let compactions = session.compactionMarkers || scanCompactionMarkers(session.msgs);
|
|
1342
1342
|
|
|
1343
1343
|
// If no compactions in current session, check previous session (new session fallback)
|
|
1344
|
-
|
|
1345
|
-
|
|
1344
|
+
// Use allSessions not inactiveSessions - recently compacted sessions may still be "active"
|
|
1345
|
+
if (compactions.length === 0 && allSessions.length > 1) {
|
|
1346
|
+
const prevSession = allSessions[1];
|
|
1346
1347
|
// Load previous session if not already loaded
|
|
1347
1348
|
if (!prevSession.msgs) {
|
|
1348
1349
|
const stats = fs.statSync(prevSession.filePath);
|
|
@@ -1856,6 +1857,13 @@ async function cmdLast(arg1, arg2, opts) {
|
|
|
1856
1857
|
console.log(`---`);
|
|
1857
1858
|
console.log(`Tool results: Most are noise. Only fetch with "session-recall tools --show <id>" when you see something you actually need.`);
|
|
1858
1859
|
console.log(`Session file: ${selected[0]?.filePath || 'unknown'}`);
|
|
1860
|
+
|
|
1861
|
+
// Hint if returned tokens are very small - might want compaction phases instead
|
|
1862
|
+
if (returnedK < 5 && !opts.compactionPhases) {
|
|
1863
|
+
console.log(``);
|
|
1864
|
+
console.log(`[HINT] Small context returned. For recovering from a compacted session, try:`);
|
|
1865
|
+
console.log(` session-recall last N --compactions`);
|
|
1866
|
+
}
|
|
1859
1867
|
}
|
|
1860
1868
|
|
|
1861
1869
|
function showHelp() {
|