@ravshansbox/pi-statusline 1.1.0 → 1.3.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 +4 -11
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -1,9 +1,5 @@
1
1
  import { isAbsolute, relative, resolve, sep } from 'node:path';
2
- import {
3
- type ExtensionAPI,
4
- type ExtensionContext,
5
- SettingsManager,
6
- } from '@earendil-works/pi-coding-agent';
2
+ import { type ExtensionAPI, type ExtensionContext } from '@earendil-works/pi-coding-agent';
7
3
  import { truncateToWidth, visibleWidth } from '@earendil-works/pi-tui';
8
4
 
9
5
  type Usage = {
@@ -71,8 +67,6 @@ function getUsage(ctx: ExtensionContext) {
71
67
  export default function (pi: ExtensionAPI) {
72
68
  pi.on('session_start', (_event, ctx) => {
73
69
  if (ctx.mode !== 'tui') return;
74
- const settings = SettingsManager.create(ctx.cwd);
75
-
76
70
  ctx.ui.setFooter((tui, theme, footerData) => {
77
71
  const unsub = footerData.onBranchChange(() => tui.requestRender());
78
72
  return {
@@ -114,11 +108,10 @@ export default function (pi: ExtensionAPI) {
114
108
  statsParts.push(`$${totals.cost.toFixed(3)}${usingSubscription ? ' (sub)' : ''}`);
115
109
  }
116
110
 
117
- const autoIndicator = settings.getCompactionEnabled() ? ' (auto)' : '';
118
111
  const contextDisplay =
119
112
  contextPercent === '?'
120
- ? `?/${formatTokens(contextWindow)}${autoIndicator}`
121
- : `${contextPercent}%/${formatTokens(contextWindow)}${autoIndicator}`;
113
+ ? `?/${formatTokens(contextWindow)}`
114
+ : `${contextPercent}%/${formatTokens(contextWindow)}`;
122
115
  if (contextPercentValue > 90) statsParts.push(theme.fg('error', contextDisplay));
123
116
  else if (contextPercentValue > 70) statsParts.push(theme.fg('warning', contextDisplay));
124
117
  else statsParts.push(contextDisplay);
@@ -135,7 +128,7 @@ export default function (pi: ExtensionAPI) {
135
128
  }
136
129
 
137
130
  const minPadding = 2;
138
- const modelName = model?.id || 'no-model';
131
+ const modelName = model?.id.replace(/^claude-/, '') || 'no-model';
139
132
  let right = modelName;
140
133
  if (model?.reasoning) {
141
134
  const level = ctx.thinkingLevel || 'off';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ravshansbox/pi-statusline",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Statusline extension for pi",
5
5
  "license": "MIT",
6
6
  "type": "module",