pi-sdk-web 0.3.6 → 0.3.7

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
@@ -693,16 +693,21 @@ export class PiWebServer {
693
693
  unsubscribe();
694
694
  }
695
695
  // Show command output as a modal (TUI-like). The session entry remains
696
- // for history; the modal is the transient presentation.
696
+ // for history; the modal is the transient presentation. Only entries
697
+ // carrying a text payload are shown as modals — entries without
698
+ // data.text are status traces (e.g. minimode-status) and stay
699
+ // file/event-stream only, matching TUI, which renders nothing for them.
697
700
  for (const entry of captured) {
698
701
  const data = entry.data;
699
- const message = data?.text ?? (data !== undefined ? JSON.stringify(data, null, 2) : "");
702
+ if (!data || typeof data.text !== "string" || data.text.trim().length === 0) {
703
+ continue;
704
+ }
700
705
  this.broadcast({
701
706
  type: "extension_ui_request",
702
707
  id: crypto.randomUUID(),
703
708
  method: "notify",
704
- title: data?.title ?? `/${name}`,
705
- message,
709
+ title: data.title ?? `/${name}`,
710
+ message: data.text,
706
711
  notifyType: "info",
707
712
  });
708
713
  }
@@ -554,6 +554,12 @@ class PiWebClient {
554
554
  }
555
555
 
556
556
  renderCustom(entry) {
557
+ // Status traces (appendEntry entries without data.text, e.g.
558
+ // minimode-status {mode, tools}) are file/event-stream only — TUI
559
+ // renders nothing for them, so neither do we.
560
+ if (entry.type === 'custom' && !(entry.data && typeof entry.data.text === 'string' && entry.data.text.trim().length > 0)) {
561
+ return;
562
+ }
557
563
  const customType = entry.customType || 'custom';
558
564
  const label = `[${customType}]`;
559
565
  const content = this.customEntryText(entry);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-sdk-web",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
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": {