@marshal/pi-turn-stats 0.1.5 → 0.1.7
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 +12 -9
- package/package.json +6 -3
- package/turn-stats_en.mp4 +0 -0
package/README.md
CHANGED
|
@@ -7,10 +7,13 @@ A pi extension that automatically tracks per-exchange duration, token usage (inp
|
|
|
7
7
|
- **Stats card in conversation stream** — After each reply, a stats card is appended to the stream (does not enter LLM context).
|
|
8
8
|
- **Real-time status bar** — The bottom status bar shows the last exchange's duration, throughput, token count, and cost.
|
|
9
9
|
- **`/turnstats` command** — Appends a session cumulative stats card (total exchanges, total LLM calls, total tokens, total cost).
|
|
10
|
+
- **Auto i18n** — UI labels automatically switch between Chinese and English based on your system locale (`LANG` / `LC_ALL` / `Intl`).
|
|
10
11
|
|
|
11
12
|
## Demo
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
**English locale (`LANG=en`)**
|
|
15
|
+
|
|
16
|
+

|
|
14
17
|
|
|
15
18
|
## Screenshots
|
|
16
19
|
|
|
@@ -20,7 +23,7 @@ A pi extension that automatically tracks per-exchange duration, token usage (inp
|
|
|
20
23
|
|
|
21
24
|
**English (auto-detected from `LANG=en`)**
|
|
22
25
|
|
|
23
|
-

|
|
26
|
+

|
|
24
27
|
|
|
25
28
|
## Installation
|
|
26
29
|
|
|
@@ -28,22 +31,22 @@ A pi extension that automatically tracks per-exchange duration, token usage (inp
|
|
|
28
31
|
|
|
29
32
|
```bash
|
|
30
33
|
# Install directly with pi
|
|
31
|
-
pi install
|
|
34
|
+
pi install npm:@marshal/pi-turn-stats
|
|
32
35
|
```
|
|
33
36
|
|
|
34
37
|
Or standard npm install:
|
|
35
38
|
|
|
36
39
|
```bash
|
|
37
|
-
npm install @marshal/pi-turn-stats
|
|
40
|
+
npm install -g @marshal/pi-turn-stats
|
|
38
41
|
```
|
|
39
42
|
|
|
40
|
-
> Note: `pi install
|
|
43
|
+
> Note: `pi install npm:...` registers the extension globally. Plain `npm install -g` only downloads the package without registering it as a pi extension.
|
|
41
44
|
|
|
42
45
|
**Alternative**: Install from GitHub (for source access or custom modifications).
|
|
43
46
|
|
|
44
47
|
```bash
|
|
45
|
-
# Install from GitHub repo
|
|
46
|
-
pi install
|
|
48
|
+
# Install from GitHub repo (SSH)
|
|
49
|
+
pi install git:git@github.com:MarshalW/pi-turn-stats
|
|
47
50
|
```
|
|
48
51
|
|
|
49
52
|
> Users in China are encouraged to use the npm method, as GitHub access may be unreliable.
|
|
@@ -66,6 +69,6 @@ pi install ./ # local install for testing
|
|
|
66
69
|
git tag vX.Y.Z && git push origin main --tags
|
|
67
70
|
# Publish to npm: npm version patch && npm publish --access public
|
|
68
71
|
# Consumer install:
|
|
69
|
-
# npm (recommended): pi install
|
|
70
|
-
# git (fallback): pi install
|
|
72
|
+
# npm (recommended): pi install npm:@marshal/pi-turn-stats
|
|
73
|
+
# git (fallback): pi install git:git@github.com:MarshalW/pi-turn-stats@vX.Y.Z
|
|
71
74
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marshal/pi-turn-stats",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "pi extension: per-exchange duration, token & cost stats for conversations (stream card + status bar + /turnstats command)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -12,11 +12,14 @@
|
|
|
12
12
|
"README.md",
|
|
13
13
|
"turn-stats.jpg",
|
|
14
14
|
"turn-stats.gif",
|
|
15
|
-
"turn-stats_en.png"
|
|
15
|
+
"turn-stats_en.png",
|
|
16
|
+
"turn-stats_en.mp4"
|
|
16
17
|
],
|
|
17
18
|
"pi": {
|
|
18
19
|
"extensions": [
|
|
19
20
|
"./extensions/turn-stats.ts"
|
|
20
|
-
]
|
|
21
|
+
],
|
|
22
|
+
"video": "https://github.com/MarshalW/pi-turn-stats/raw/main/turn-stats_en.mp4",
|
|
23
|
+
"image": "https://github.com/MarshalW/pi-turn-stats/raw/main/turn-stats_en.png"
|
|
21
24
|
}
|
|
22
25
|
}
|
|
Binary file
|