pi-fast-resume 1.4.2 → 1.4.3
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/fast-resume.ts +16 -0
- package/package.json +1 -1
package/fast-resume.ts
CHANGED
|
@@ -1384,6 +1384,22 @@ async function showFastResumePicker(
|
|
|
1384
1384
|
"info",
|
|
1385
1385
|
);
|
|
1386
1386
|
|
|
1387
|
+
if (ctx.mode !== "tui") {
|
|
1388
|
+
if (!ctx.hasUI) return;
|
|
1389
|
+
if (currentSessions.length === 0) {
|
|
1390
|
+
ctx.ui.notify("No sessions found to resume.", "info");
|
|
1391
|
+
return;
|
|
1392
|
+
}
|
|
1393
|
+
const items = currentSessions.map((h) => `${h.name ?? h.firstMessage} (${formatSessionDate(h.modified)})`);
|
|
1394
|
+
const pick = await ctx.ui.select("Fast resume \u2014 pick a session", items);
|
|
1395
|
+
if (pick === undefined) return;
|
|
1396
|
+
const idx = items.indexOf(pick);
|
|
1397
|
+
if (idx < 0) return;
|
|
1398
|
+
const session = currentSessions[idx];
|
|
1399
|
+
if (session) await ctx.switchSession(session.path);
|
|
1400
|
+
return;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1387
1403
|
const result = await ctx.ui.custom<FastResumeResult>(
|
|
1388
1404
|
(_tui, theme, _kb, done) => {
|
|
1389
1405
|
const picker = new FastResumePicker(
|
package/package.json
CHANGED