pi-sdk-web 0.5.11 → 0.5.13
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/pi-bin/pii +10 -3
- package/dist/pi-bin/pii-cli.js +1 -0
- package/dist/static/style.css +5 -1
- package/package.json +1 -1
package/dist/pi-bin/pii
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
pii r <name> Resume the session with the given name via `pi --session <id>`
|
|
7
7
|
pii r <name> --web [port] Start web mode (default port 4080)
|
|
8
8
|
pii delete <name> Delete all sessions with the given name (asks for confirmation)
|
|
9
|
+
pii delete "(unnamed)" Delete all sessions without a display name
|
|
9
10
|
"""
|
|
10
11
|
import json
|
|
11
12
|
import os
|
|
@@ -129,10 +130,15 @@ def confirm(prompt):
|
|
|
129
130
|
|
|
130
131
|
|
|
131
132
|
def cmd_delete(name):
|
|
132
|
-
|
|
133
|
+
# "(unnamed)" matches sessions without a session_info name (listed as
|
|
134
|
+
# (unnamed) by cmd_list) - same pattern as Pi's "(unnamed)" display.
|
|
135
|
+
if name == "(unnamed)":
|
|
136
|
+
hits = [r for r in sessions() if not r["name"]]
|
|
137
|
+
else:
|
|
138
|
+
hits = [r for r in sessions() if r["name"] == name]
|
|
133
139
|
if not hits:
|
|
134
140
|
print(f"No session named '{name}'", file=sys.stderr)
|
|
135
|
-
names = sorted({r["name"] for r in sessions()})
|
|
141
|
+
names = sorted({r["name"] for r in sessions() if r["name"]})
|
|
136
142
|
if names:
|
|
137
143
|
print(f"Available names: {', '.join(names)}", file=sys.stderr)
|
|
138
144
|
sys.exit(1)
|
|
@@ -141,8 +147,9 @@ def cmd_delete(name):
|
|
|
141
147
|
else:
|
|
142
148
|
print(f"{len(hits)} sessions named '{name}':")
|
|
143
149
|
for r in hits:
|
|
150
|
+
label = r["name"] or "(unnamed)"
|
|
144
151
|
print(f" {r['id']} {r['cwd']} {r['file']}")
|
|
145
|
-
if not confirm(f"Delete {r['id']}? [y/N] "):
|
|
152
|
+
if not confirm(f"Delete {label} ({r['id']})? [y/N] "):
|
|
146
153
|
print(f" Skipped {r['id']}")
|
|
147
154
|
continue
|
|
148
155
|
try:
|
package/dist/pi-bin/pii-cli.js
CHANGED
package/dist/static/style.css
CHANGED
|
@@ -519,7 +519,11 @@ body {
|
|
|
519
519
|
padding: 0;
|
|
520
520
|
font-size: 0.9em;
|
|
521
521
|
line-height: 1.5;
|
|
522
|
-
|
|
522
|
+
/* Wrap long lines instead of horizontal scrolling (user preference:
|
|
523
|
+
no x-scroll in message content). pre-wrap breaks at spaces;
|
|
524
|
+
overflow-wrap:anywhere also breaks unbroken long tokens (base64 etc). */
|
|
525
|
+
white-space: pre-wrap;
|
|
526
|
+
overflow-wrap: anywhere;
|
|
523
527
|
}
|
|
524
528
|
|
|
525
529
|
.body-text blockquote,
|