replit-tools 1.2.26 → 1.2.28
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
CHANGED
|
@@ -358,7 +358,10 @@ get_recent_24h_sessions() {
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
const normTs = (t) => typeof t === 'number' ? t : (Date.parse(t) || 0);
|
|
361
|
-
const
|
|
361
|
+
const snippet = (s, n = 40) => {
|
|
362
|
+
const clean = (s || '').replace(/\s+/g, ' ').trim();
|
|
363
|
+
return clean.length > n ? clean.slice(0, n - 1) + '…' : clean;
|
|
364
|
+
};
|
|
362
365
|
const ago = (ts) => {
|
|
363
366
|
const mins = Math.round((Date.now() - ts) / 60000);
|
|
364
367
|
if (mins < 1) return 'just now';
|
|
@@ -373,7 +376,7 @@ get_recent_24h_sessions() {
|
|
|
373
376
|
.slice(0, 9);
|
|
374
377
|
|
|
375
378
|
sorted.forEach((s, i) => {
|
|
376
|
-
console.log((i+1) + '|' + s.tool + '|' + s.id + '|' + ago(s.lastSeen) + '|' +
|
|
379
|
+
console.log((i+1) + '|' + s.tool + '|' + s.id + '|' + ago(s.lastSeen) + '|' + snippet(s.firstPrompt, 13));
|
|
377
380
|
});
|
|
378
381
|
" 2>/dev/null
|
|
379
382
|
}
|