engine7 7.1.15 → 7.1.16
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/dist/cli.mjs +3 -4
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -165,11 +165,10 @@ function collectRecentSessions(agentsDir, _days = 7) {
|
|
|
165
165
|
scanSessionsDir(agentsDir);
|
|
166
166
|
const mainSessionId = readMainSessionId(path.join(agentsDir, "main", "sessions", "platform-map.json"));
|
|
167
167
|
for (const [sessionKey, group] of sessionGroups) {
|
|
168
|
+
if (!mainSessionId || !sessionKey.includes(mainSessionId)) continue;
|
|
168
169
|
if (group.jsonl) files.push(group.jsonl);
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (group.archived.length > 0) files.push(group.archived[0].file);
|
|
172
|
-
}
|
|
170
|
+
group.archived.sort((a, b) => b.mtime - a.mtime);
|
|
171
|
+
if (group.archived.length > 0) files.push(group.archived[0].file);
|
|
173
172
|
}
|
|
174
173
|
return files;
|
|
175
174
|
}
|