@pi-unipi/footer 3.0.0-alpha.0 → 3.0.0-alpha.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/footer",
3
- "version": "3.0.0-alpha.0",
4
- "description": "Persistent status bar for Unipi \u2014 subscribes to UNIPI_EVENTS and renders key stats from all unipi packages",
3
+ "version": "3.0.0-alpha.2",
4
+ "description": "Persistent status bar for Unipi — subscribes to UNIPI_EVENTS and renders key stats from all unipi packages",
5
5
  "type": "module",
6
6
  "main": "index.ts",
7
7
  "license": "MIT",
@@ -32,12 +32,12 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "@pi-unipi/core": "3.0.0-alpha.0",
36
- "@pi-unipi/background-tasks": "3.0.0-alpha.0"
35
+ "@pi-unipi/core": "3.0.0-alpha.2",
36
+ "@pi-unipi/background-tasks": "3.0.0-alpha.2"
37
37
  },
38
38
  "peerDependencies": {
39
- "@earendil-works/pi-coding-agent": "^0.86.0",
40
- "@earendil-works/pi-tui": "^0.86.0"
39
+ "@earendil-works/pi-coding-agent": "^0.87.1",
40
+ "@earendil-works/pi-tui": "^0.87.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^25.6.0",
@@ -35,6 +35,9 @@ interface InfoMemoryData {
35
35
  projectCount?: { value: string };
36
36
  totalCount?: { value: string };
37
37
  consolidations?: { value: string };
38
+ recall?: { value: string };
39
+ write?: { value: string };
40
+ pending?: { value: string };
38
41
  [key: string]: unknown;
39
42
  }
40
43
 
@@ -138,8 +141,28 @@ function renderConsolidationsSegment(ctx: FooterSegmentContext): RenderedSegment
138
141
  return { content: applyColor("memory", content, ctx.theme, ctx.colors), visible: true };
139
142
  }
140
143
 
144
+ /** recall/write state + pending count, from the memory info group's dataProvider. */
145
+ function renderMemoryStateSegment(ctx: FooterSegmentContext): RenderedSegment {
146
+ const infoData = getInfoRegistryMemoryData();
147
+ const recall = infoData?.recall?.value;
148
+ const write = infoData?.write?.value;
149
+ const pending = infoData?.pending?.value;
150
+ if (recall === undefined && write === undefined && pending === undefined) {
151
+ return { content: "", visible: false };
152
+ }
153
+ const parts = [
154
+ recall !== undefined ? `r:${recall}` : null,
155
+ write !== undefined ? `w:${write}` : null,
156
+ pending !== undefined && pending !== "0" ? `+${pending}⧗` : null,
157
+ ].filter(Boolean).join(" ");
158
+ if (!parts) return { content: "", visible: false };
159
+ const content = withIcon("memoryState", parts);
160
+ return { content: applyColor("memory", content, ctx.theme, ctx.colors), visible: true };
161
+ }
162
+
141
163
  export const MEMORY_SEGMENTS: FooterSegment[] = [
142
164
  { id: "project_count", label: "Project Memory", shortLabel: "MEM", description: "Memory entries for this project", zone: "center", render: renderProjectCountSegment, defaultShow: true },
143
165
  { id: "total_count", label: "Total Memory", shortLabel: "TOT", description: "Total memory entries across projects", zone: "center", render: renderTotalCountSegment, defaultShow: true },
166
+ { id: "memory_state", label: "Memory State", shortLabel: "MST", description: "Recall/write switches + pending ops", zone: "center", render: renderMemoryStateSegment, defaultShow: true },
144
167
  { id: "consolidations", label: "Consolidations", shortLabel: "CNS", description: "Number of memory consolidations", zone: "center", render: renderConsolidationsSegment, defaultShow: false },
145
168
  ];