@pi-unipi/info-screen 0.1.20 → 0.1.22
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/README.md +17 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
# @pi-unipi/info-screen
|
|
2
2
|
|
|
3
|
-
Dashboard
|
|
3
|
+
Dashboard overlay that shows what's running. Displays module status, registered tools, custom data groups, and load times in a tabbed interface.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pi install npm:@pi-unipi/info-screen
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Or as part of the full suite:
|
|
12
|
-
```bash
|
|
13
|
-
pi install npm:unipi
|
|
14
|
-
```
|
|
5
|
+
Every Unipi module registers itself via `MODULE_READY` events. Info-screen picks these up and builds a live dashboard. Other packages add their own data groups — ralph shows active loops, memory shows counts, compactor shows token savings.
|
|
15
6
|
|
|
16
7
|
## Commands
|
|
17
8
|
|
|
@@ -20,18 +11,11 @@ pi install npm:unipi
|
|
|
20
11
|
| `/unipi:info` | Show info screen dashboard |
|
|
21
12
|
| `/unipi:info-settings` | Configure info display (groups, stats, visibility) |
|
|
22
13
|
|
|
23
|
-
##
|
|
14
|
+
## Special Triggers
|
|
24
15
|
|
|
25
|
-
-
|
|
26
|
-
- **Tabbed groups** — each module registers info groups with custom data providers
|
|
27
|
-
- **Configurable** — per-group and per-stat visibility via settings
|
|
28
|
-
- **Boot overlay** — shows dashboard on session start (configurable)
|
|
29
|
-
- **Styled dialog chrome** — uses pi-tui theme API for consistent borders, scrollable content, and navigation hints (matching the overlay style used by @pi-unipi/btw)
|
|
30
|
-
- **Core groups** — modules, tools, load time, session info out of the box
|
|
16
|
+
Info-screen listens for `MODULE_READY` events from `@pi-unipi/core`. When a module loads, info-screen adds it to the modules group automatically. No registration needed for basic module tracking.
|
|
31
17
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Other modules register info groups via the global registry:
|
|
18
|
+
Packages that want custom data groups use the registry API:
|
|
35
19
|
|
|
36
20
|
```typescript
|
|
37
21
|
import { infoRegistry } from "@pi-unipi/info-screen";
|
|
@@ -55,11 +39,9 @@ infoRegistry.registerGroup({
|
|
|
55
39
|
});
|
|
56
40
|
```
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
### `infoRegistry`
|
|
42
|
+
The footer package reads info-screen data for its extension status segment.
|
|
61
43
|
|
|
62
|
-
|
|
44
|
+
## Registry API
|
|
63
45
|
|
|
64
46
|
| Method | Description |
|
|
65
47
|
|--------|-------------|
|
|
@@ -72,12 +54,13 @@ Singleton registry instance. Also available globally via `globalThis.__unipi_inf
|
|
|
72
54
|
| `getVisibleStats(id)` | Get enabled stats for a group |
|
|
73
55
|
| `invalidateCache(id)` | Invalidate cached data |
|
|
74
56
|
|
|
57
|
+
The registry is a singleton, also available globally via `globalThis.__unipi_info_registry`.
|
|
58
|
+
|
|
75
59
|
### Load Tracking
|
|
76
60
|
|
|
77
61
|
```typescript
|
|
78
62
|
import { startLoadTracking, recordLoadTime, finishLoadTracking, recordModuleStart } from "@pi-unipi/info-screen";
|
|
79
63
|
|
|
80
|
-
// Track module load times
|
|
81
64
|
startLoadTracking();
|
|
82
65
|
recordModuleStart("@pi-unipi/memory");
|
|
83
66
|
// ... module loads ...
|
|
@@ -85,9 +68,9 @@ recordLoadTime("@pi-unipi/memory", "module", 150);
|
|
|
85
68
|
finishLoadTracking();
|
|
86
69
|
```
|
|
87
70
|
|
|
88
|
-
##
|
|
71
|
+
## Configurables
|
|
89
72
|
|
|
90
|
-
|
|
73
|
+
Settings in pi `settings.json`:
|
|
91
74
|
|
|
92
75
|
```json
|
|
93
76
|
{
|
|
@@ -106,9 +89,12 @@ Configure in pi `settings.json`:
|
|
|
106
89
|
}
|
|
107
90
|
```
|
|
108
91
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
92
|
+
| Setting | Default | What It Does |
|
|
93
|
+
|---------|---------|--------------|
|
|
94
|
+
| `showOnBoot` | true | Show dashboard when session starts |
|
|
95
|
+
| `bootTimeoutMs` | 8000 | How long to wait for modules before showing |
|
|
96
|
+
| `groups.{id}.show` | true | Toggle group visibility |
|
|
97
|
+
| `groupOrder` | priority sort | Custom group ordering |
|
|
112
98
|
|
|
113
99
|
## License
|
|
114
100
|
|