@pi-unipi/info-screen 2.1.3 → 2.2.1
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/package.json +2 -2
- package/tui/info-overlay.ts +5 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/info-screen",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Dashboard and module registry for Unipi — configurable info overlay with tabbed groups",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@pi-unipi/core": "2.
|
|
36
|
+
"@pi-unipi/core": "2.2.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@earendil-works/pi-coding-agent": "^0.80.0",
|
package/tui/info-overlay.ts
CHANGED
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { Component } from "@earendil-works/pi-tui";
|
|
11
|
-
import { truncateToWidth, visibleWidth, wrapTextWithAnsi } from "@earendil-works/pi-tui";
|
|
11
|
+
import { matchesKey, truncateToWidth, visibleWidth, wrapTextWithAnsi } from "@earendil-works/pi-tui";
|
|
12
12
|
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
13
13
|
import { infoRegistry } from "../registry.js";
|
|
14
14
|
import { getInfoSettings } from "../config.js";
|
|
15
15
|
import type { InfoGroup, GroupData } from "../types.js";
|
|
16
|
+
import { boxInnerWidth } from "@pi-unipi/core";
|
|
16
17
|
|
|
17
18
|
/** Tab color palette */
|
|
18
19
|
const TAB_FG: Array<"accent" | "success" | "warning" | "error"> = [
|
|
@@ -199,7 +200,7 @@ export class InfoOverlay implements Component {
|
|
|
199
200
|
} else if (data === "R") {
|
|
200
201
|
// Refresh all
|
|
201
202
|
this.refreshAll();
|
|
202
|
-
} else if (data === "q" || data
|
|
203
|
+
} else if (data === "q" || matchesKey(data, "escape")) {
|
|
203
204
|
this.destroy();
|
|
204
205
|
this.onClose?.();
|
|
205
206
|
}
|
|
@@ -275,7 +276,7 @@ export class InfoOverlay implements Component {
|
|
|
275
276
|
// ─── State views ─────────────────────────────────────────────────────
|
|
276
277
|
|
|
277
278
|
private renderEmpty(width: number): string[] {
|
|
278
|
-
const innerWidth =
|
|
279
|
+
const innerWidth = boxInnerWidth(width);
|
|
279
280
|
const lines: string[] = [];
|
|
280
281
|
lines.push(this.borderLine(innerWidth, "top"));
|
|
281
282
|
lines.push(this.frameLine(this.fg("accent", this.bold("📊 UniPi Info Screen")), innerWidth));
|
|
@@ -292,7 +293,7 @@ export class InfoOverlay implements Component {
|
|
|
292
293
|
// ─── Dashboard ───────────────────────────────────────────────────────
|
|
293
294
|
|
|
294
295
|
private renderDashboard(width: number): string[] {
|
|
295
|
-
const innerWidth =
|
|
296
|
+
const innerWidth = boxInnerWidth(width);
|
|
296
297
|
const group = this.groups[this.activeTabIndex];
|
|
297
298
|
const data = this.groupData.get(group.id) ?? {};
|
|
298
299
|
const isLoading = this.groupLoading.get(group.id) ?? false;
|