@ravshansbox/pi-statusline 1.6.0 → 1.7.0

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.
Files changed (2) hide show
  1. package/index.ts +8 -8
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -81,14 +81,6 @@ export default function (pi: ExtensionAPI) {
81
81
  const top = topParts.join(' • ');
82
82
 
83
83
  const statsParts: string[] = [];
84
- if (totals.input) statsParts.push(`↑${formatTokens(totals.input)}`);
85
- if (totals.output) statsParts.push(`↓${formatTokens(totals.output)}`);
86
- if (totals.cacheRead) statsParts.push(`R${formatTokens(totals.cacheRead)}`);
87
- if (totals.cacheWrite) statsParts.push(`W${formatTokens(totals.cacheWrite)}`);
88
- if ((totals.cacheRead > 0 || totals.cacheWrite > 0) && latestCacheHitRate !== undefined) {
89
- statsParts.push(`CH${latestCacheHitRate.toFixed(0)}%`);
90
- }
91
-
92
84
  const contextDisplay =
93
85
  contextPercent === '?'
94
86
  ? `?/${formatTokens(contextWindow)}`
@@ -97,6 +89,14 @@ export default function (pi: ExtensionAPI) {
97
89
  else if (contextPercentValue > 70) statsParts.push(theme.fg('warning', contextDisplay));
98
90
  else statsParts.push(contextDisplay);
99
91
 
92
+ if (totals.input) statsParts.push(`↑${formatTokens(totals.input)}`);
93
+ if (totals.output) statsParts.push(`↓${formatTokens(totals.output)}`);
94
+ if (totals.cacheRead) statsParts.push(`R${formatTokens(totals.cacheRead)}`);
95
+ if (totals.cacheWrite) statsParts.push(`W${formatTokens(totals.cacheWrite)}`);
96
+ if ((totals.cacheRead > 0 || totals.cacheWrite > 0) && latestCacheHitRate !== undefined) {
97
+ statsParts.push(`CH${latestCacheHitRate.toFixed(0)}%`);
98
+ }
99
+
100
100
  if (process.env['PI_EXPERIMENTAL'] === '1') {
101
101
  statsParts.push(`${theme.fg('dim', '•')} ${theme.bold(theme.fg('warning', 'xp'))}`);
102
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ravshansbox/pi-statusline",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Statusline extension for pi",
5
5
  "license": "MIT",
6
6
  "type": "module",