@pi-unipi/utility 2.4.0 → 2.4.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/README.md +1 -1
- package/package.json +7 -4
- package/src/commands.ts +2 -10
- package/src/diff/theme.ts +0 -3
- package/src/tui/name-badge.ts +0 -9
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ The diff rendering is the standout feature — Shiki-powered syntax-highlighted
|
|
|
10
10
|
|---------|-------------|
|
|
11
11
|
| `/unipi:env` | Show environment info (Node, Pi, OS, paths) |
|
|
12
12
|
| `/unipi:doctor` | Run diagnostics across all modules |
|
|
13
|
-
| `/unipi:status` | Show
|
|
13
|
+
| `/unipi:status` | Show immediate guidance to the live `/unipi:info` dashboard and `/unipi:doctor` diagnostics |
|
|
14
14
|
| `/unipi:cleanup` | Clean stale DBs, temp files, old sessions |
|
|
15
15
|
| `/unipi:reload` | Explain how to reload extensions |
|
|
16
16
|
| `/unipi:name-badge` | Toggle name badge overlay |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/utility",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Utility commands and tools for Pi coding agent — lifecycle, diagnostics, cache, analytics, display, batch execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -28,21 +28,24 @@
|
|
|
28
28
|
"src/types.ts",
|
|
29
29
|
"src/**/*.ts",
|
|
30
30
|
"README.md",
|
|
31
|
-
"skills/**/*.md"
|
|
31
|
+
"skills/**/*.md",
|
|
32
|
+
"!src/__tests__/**",
|
|
33
|
+
"!src/**/*.test.ts"
|
|
32
34
|
],
|
|
33
35
|
"publishConfig": {
|
|
34
36
|
"access": "public"
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
37
|
-
"@pi-unipi/core": "2.4.
|
|
39
|
+
"@pi-unipi/core": "2.4.1",
|
|
38
40
|
"diff": "^7.0.0",
|
|
39
|
-
"
|
|
41
|
+
"shiki": "^4.0.2"
|
|
40
42
|
},
|
|
41
43
|
"devDependencies": {
|
|
42
44
|
"@types/diff": "^7.0.2"
|
|
43
45
|
},
|
|
44
46
|
"peerDependencies": {
|
|
45
47
|
"@earendil-works/pi-coding-agent": "^0.80.0",
|
|
48
|
+
"@earendil-works/pi-tui": "^0.80.0",
|
|
46
49
|
"typebox": "^1.1.38"
|
|
47
50
|
},
|
|
48
51
|
"scripts": {
|
package/src/commands.ts
CHANGED
|
@@ -234,19 +234,11 @@ export function registerUtilityCommands(pi: ExtensionAPI): void {
|
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
// Request status from all modules — responses will be logged
|
|
238
|
-
const requestId = `status-${Date.now()}`;
|
|
239
|
-
emitEvent(pi, UNIPI_EVENTS.MODULE_STATUS_REQUEST, { requestId });
|
|
240
|
-
|
|
241
|
-
// Give modules a moment to respond, then show what we know
|
|
242
|
-
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
243
|
-
|
|
244
237
|
sendResponse(
|
|
245
238
|
pi,
|
|
246
239
|
"## 📊 Module Status\n\n" +
|
|
247
|
-
"
|
|
248
|
-
"
|
|
249
|
-
`*Request ID: \`${requestId}\`*`,
|
|
240
|
+
"Use `/unipi:info` for the live module and tool dashboard.\n" +
|
|
241
|
+
"Use `/unipi:doctor` to run configuration and runtime diagnostics.",
|
|
250
242
|
);
|
|
251
243
|
},
|
|
252
244
|
});
|
package/src/diff/theme.ts
CHANGED
|
@@ -101,9 +101,6 @@ const PRESETS: Record<string, DiffPreset> = {
|
|
|
101
101
|
},
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
/** Hardcoded fallback colors (last resort) */
|
|
105
|
-
const HARDCODED_FALLBACK: DiffColors = PRESETS.default.colors;
|
|
106
|
-
|
|
107
104
|
// ─── Preset Access ──────────────────────────────────────────────────────────────
|
|
108
105
|
|
|
109
106
|
/**
|
package/src/tui/name-badge.ts
CHANGED
|
@@ -13,15 +13,6 @@ import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
|
13
13
|
/** Placeholder text when no session name is set */
|
|
14
14
|
const PLACEHOLDER = "Set a name";
|
|
15
15
|
|
|
16
|
-
/**
|
|
17
|
-
* Pad content to exact visible width.
|
|
18
|
-
*/
|
|
19
|
-
function padVisible(content: string, targetWidth: number): string {
|
|
20
|
-
const vw = visibleWidth(content);
|
|
21
|
-
const pad = Math.max(0, targetWidth - vw);
|
|
22
|
-
return content + " ".repeat(pad);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
16
|
/**
|
|
26
17
|
* NameBadgeComponent — bordered box HUD overlay showing session name.
|
|
27
18
|
*
|