pi-sdk-web 0.1.6 → 0.1.8

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/server.js CHANGED
@@ -9,10 +9,10 @@
9
9
  * - Client msgs: prompt/abort/get_stats/bash/cycle_model/set_model/... -> session methods
10
10
  */
11
11
  import { execFileSync } from "node:child_process";
12
- import { existsSync } from "node:fs";
12
+ import { existsSync, readFileSync } from "node:fs";
13
13
  import { readFile } from "node:fs/promises";
14
14
  import { createServer } from "node:http";
15
- import { dirname, resolve } from "node:path";
15
+ import { dirname, join, resolve } from "node:path";
16
16
  import { fileURLToPath } from "node:url";
17
17
  import { ModelRegistry, VERSION, } from "@earendil-works/pi-coding-agent";
18
18
  import { WebSocket, WebSocketServer } from "ws";
@@ -23,6 +23,16 @@ const DEFAULT_PORT = 4080;
23
23
  const PACKAGE_DIR = resolve(dirname(fileURLToPath(import.meta.url)), "..");
24
24
  const STATIC_DIR = [resolve(PACKAGE_DIR, "static"), resolve(PACKAGE_DIR, "..", "static")].find((p) => existsSync(p)) ??
25
25
  resolve(PACKAGE_DIR, "..", "static");
26
+ // Our own package version (pi-sdk-web), shown in the header next to Pi's version
27
+ const PI_WEB_VERSION = (() => {
28
+ try {
29
+ const pkg = JSON.parse(readFileSync(join(PACKAGE_DIR, "package.json"), "utf8"));
30
+ return pkg.version ?? "dev";
31
+ }
32
+ catch {
33
+ return "dev";
34
+ }
35
+ })();
26
36
  // Events after which footer stats should be refreshed (TUI does this too)
27
37
  const STATS_REFRESH_EVENTS = new Set([
28
38
  "agent_settled",
@@ -204,6 +214,7 @@ export class PiWebServer {
204
214
  autoCompactionEnabled: this.session.autoCompactionEnabled,
205
215
  messageCount: this.session.messages.length,
206
216
  version: VERSION,
217
+ piWebVersion: PI_WEB_VERSION,
207
218
  cwd: this.formatCwd(this.session.sessionManager.getCwd()),
208
219
  gitBranch: this.getGitBranch(this.session.sessionManager.getCwd()),
209
220
  commands: this.getCommands(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-sdk-web",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
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": {
package/static/app.js CHANGED
@@ -191,9 +191,11 @@ class PiWebClient {
191
191
  document.title = `pi-web - ${state.sessionName || state.sessionId}`;
192
192
  }
193
193
 
194
- // Header version
194
+ // Header version: pi v<pi version> · pi-web v<pi-sdk-web version>
195
195
  if (this.versionEl && state.version) {
196
- this.versionEl.textContent = `v${state.version}`;
196
+ const parts = [`v${state.version}`];
197
+ if (state.piWebVersion) parts.push(`pi-web v${state.piWebVersion}`);
198
+ this.versionEl.textContent = parts.join(' · ');
197
199
  }
198
200
 
199
201
  // Loaded resources
package/static/style.css CHANGED
@@ -400,6 +400,8 @@ body {
400
400
  .message.user .body ol {
401
401
  margin: 0.4em 0;
402
402
  padding-left: 1.6em;
403
+ /* Inline markers: keep numbers/bullets aligned with the text (not flush left) */
404
+ list-style-position: inside;
403
405
  }
404
406
 
405
407
  .body-text li,