@xynogen/pix-commands 0.3.2 → 0.3.6
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 +3 -3
- package/src/btw/render.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-commands",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Pi extension — slash commands for cache clearing and isolated side questions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@earendil-works/pi-tui": "*"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@xynogen/pix-pretty": "^1.
|
|
49
|
-
"@xynogen/pix-runtime": "^0.
|
|
48
|
+
"@xynogen/pix-pretty": "^1.13.0",
|
|
49
|
+
"@xynogen/pix-runtime": "^0.5.3"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/src/btw/render.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getMarkdownTheme } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { Box, Markdown, Spacer, Text } from "@earendil-works/pi-tui";
|
|
3
3
|
import { icon } from "@xynogen/pix-pretty/icon-catalog";
|
|
4
|
+
import { formatDuration as fmtDuration } from "@xynogen/pix-pretty/widget-format";
|
|
4
5
|
|
|
5
6
|
export interface BtwMessageDetails {
|
|
6
7
|
question: string;
|
|
@@ -14,10 +15,9 @@ export interface BtwMessageDetails {
|
|
|
14
15
|
error?: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
// ponytail: thin wrapper keeps old import path; canonical is formatDuration(ms,'btw') in pix-pretty
|
|
17
19
|
export function formatDuration(ms: number): string {
|
|
18
|
-
|
|
19
|
-
if (ms < 60_000) return `${(ms / 1_000).toFixed(ms < 10_000 ? 1 : 0)}s`;
|
|
20
|
-
return `${Math.floor(ms / 60_000)}m ${Math.round((ms % 60_000) / 1_000)}s`;
|
|
20
|
+
return fmtDuration(ms, "btw");
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export function registerBtwRenderer(
|