pi-arsenal 0.1.3 → 0.2.0
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/extensions/startup-splash.ts +7 -7
- package/extensions/workspace-drawer.ts +793 -510
- package/lib/session-library.ts +8 -2
- package/package.json +25 -5
package/lib/session-library.ts
CHANGED
|
@@ -93,13 +93,19 @@ function detailTitle(session: SessionInfo, current: boolean, description: string
|
|
|
93
93
|
|
|
94
94
|
export async function openSessionLibrary(pi: ExtensionAPI, ctx: ExtensionCommandContext): Promise<void> {
|
|
95
95
|
if (ctx.mode !== "tui") return;
|
|
96
|
+
const createNew = "+ New session";
|
|
96
97
|
while (true) {
|
|
97
98
|
const currentPath = ctx.sessionManager.getSessionFile();
|
|
98
99
|
const available = await listSessions();
|
|
99
|
-
if (!available.length) { ctx.ui.notify("No persisted Pi sessions found.", "info"); return; }
|
|
100
100
|
const options = available.map((session) => `${sessionTitle(session)} — ${relativeTime(session.modified)} · ${session.messageCount} messages${session.path === currentPath ? " ● current" : ""}`);
|
|
101
|
-
const choice = await ctx.ui.select("Session Library", [...options, "Cancel"]);
|
|
101
|
+
const choice = await ctx.ui.select("Session Library", [createNew, ...options, "Cancel"]);
|
|
102
102
|
if (!choice || choice === "Cancel") return;
|
|
103
|
+
if (choice === createNew) {
|
|
104
|
+
await ctx.waitForIdle();
|
|
105
|
+
const result = await ctx.newSession({ withSession: async (replacement) => replacement.ui.notify("New session started.", "info") });
|
|
106
|
+
if (!result.cancelled) return;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
103
109
|
const session = available[options.indexOf(choice)];
|
|
104
110
|
if (!session) continue;
|
|
105
111
|
if (await manageSession(pi, ctx, session, currentPath) === "switch") return;
|
package/package.json
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-arsenal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A terminal control deck for Pi: workspaces, sessions, skills, MCP, tasks, theme, and splash.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"keywords": [
|
|
8
|
-
|
|
7
|
+
"keywords": [
|
|
8
|
+
"pi-package",
|
|
9
|
+
"pi",
|
|
10
|
+
"pi-coding-agent",
|
|
11
|
+
"extension",
|
|
12
|
+
"theme",
|
|
13
|
+
"tui",
|
|
14
|
+
"workspace",
|
|
15
|
+
"sessions"
|
|
16
|
+
],
|
|
17
|
+
"files": [
|
|
18
|
+
"extensions",
|
|
19
|
+
"lib",
|
|
20
|
+
"themes",
|
|
21
|
+
"README.md",
|
|
22
|
+
"LICENSE"
|
|
23
|
+
],
|
|
9
24
|
"dependencies": {
|
|
10
25
|
"pi-choices": "^0.1.4"
|
|
11
26
|
},
|
|
@@ -15,8 +30,13 @@
|
|
|
15
30
|
"@earendil-works/pi-tui": "*"
|
|
16
31
|
},
|
|
17
32
|
"pi": {
|
|
18
|
-
"extensions": [
|
|
19
|
-
|
|
33
|
+
"extensions": [
|
|
34
|
+
"./extensions",
|
|
35
|
+
"./node_modules/pi-choices/extensions"
|
|
36
|
+
],
|
|
37
|
+
"themes": [
|
|
38
|
+
"./themes"
|
|
39
|
+
]
|
|
20
40
|
},
|
|
21
41
|
"repository": {
|
|
22
42
|
"type": "git",
|