pi-sdk-web 0.5.10 → 0.5.12

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 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
- hits = [r for r in sessions() if r["name"] == name]
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:
@@ -11,6 +11,7 @@
11
11
  * pii list [-l]
12
12
  * pii r <name> [--web [port]]
13
13
  * pii delete <name>
14
+ * pii delete "(unnamed)"
14
15
  */
15
16
  import { spawnSync } from "node:child_process";
16
17
  import { existsSync } from "node:fs";
@@ -4,6 +4,7 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>pi-web</title>
7
+ <link rel="icon" type="image/svg+xml" href="pi-logo.svg">
7
8
  <link rel="stylesheet" href="style.css">
8
9
  </head>
9
10
  <body>
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800">
3
+ <style>
4
+ .logo-mark { fill: #000; }
5
+ @media (prefers-color-scheme: dark) {
6
+ .logo-mark { fill: #fff; }
7
+ }
8
+ </style>
9
+ <!-- P shape: outer boundary clockwise, inner hole counter-clockwise -->
10
+ <path class="logo-mark" fill-rule="evenodd" d="
11
+ M165.29 165.29
12
+ H517.36
13
+ V400
14
+ H400
15
+ V517.36
16
+ H282.65
17
+ V634.72
18
+ H165.29
19
+ Z
20
+ M282.65 282.65
21
+ V400
22
+ H400
23
+ V282.65
24
+ Z
25
+ "/>
26
+ <!-- i dot -->
27
+ <path class="logo-mark" d="M517.36 400 H634.72 V634.72 H517.36 Z"/>
28
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-sdk-web",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "description": "Browser Web access for Pi (AI coding agent) via the Pi SDK - standalone module, zero modification to Pi itself",
5
5
  "type": "module",
6
6
  "bin": {