pi-powerline 0.4.2 → 0.5.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/header.ts +11 -0
  2. package/package.json +1 -1
package/header.ts CHANGED
@@ -144,6 +144,8 @@ interface HeaderInfo {
144
144
  promptsCount: number;
145
145
  extensionsCount: number;
146
146
  commandsCount: number;
147
+ tools: string[];
148
+ toolsCount: number;
147
149
  }
148
150
 
149
151
  function renderBullet(theme: Theme, value: string, width: number): string[] {
@@ -195,6 +197,7 @@ function renderLogo(
195
197
  `prompts: ${info.promptsCount}`,
196
198
  `extensions: ${info.extensionsCount}`,
197
199
  `commands: ${info.commandsCount}`,
200
+ `tools: ${info.toolsCount}`,
198
201
  ].join(' | ');
199
202
 
200
203
  return [
@@ -204,6 +207,8 @@ function renderLogo(
204
207
  '',
205
208
  ...renderInfoSection(theme, 'Context', info.contextItems, width),
206
209
  '',
210
+ ...renderInfoSection(theme, 'Tools', info.tools, width),
211
+ '',
207
212
  ...renderInfoSection(theme, 'Skills', info.skills, width),
208
213
  '',
209
214
  ...renderInfoSection(
@@ -360,6 +365,10 @@ function collectHeaderInfo(
360
365
  const allThemes = typeof ctx.ui.getAllThemes === 'function' ? ctx.ui.getAllThemes() : [];
361
366
  const themeName = theme.name ?? ctx.ui.theme?.name ?? 'current';
362
367
  const extensions = getExtensionItems(ctx.cwd, commands);
368
+ const activeTools =
369
+ typeof pi.getActiveTools === 'function'
370
+ ? pi.getActiveTools().sort((a, b) => a.localeCompare(b))
371
+ : [];
363
372
 
364
373
  return {
365
374
  themeName,
@@ -375,6 +384,8 @@ function collectHeaderInfo(
375
384
  promptsCount: countUniqueSources(commands, 'prompt'),
376
385
  extensionsCount: extensions.length,
377
386
  commandsCount: commands.length,
387
+ tools: activeTools,
388
+ toolsCount: activeTools.length,
378
389
  };
379
390
  }
380
391
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-powerline",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Powerline-style UI extensions for pi coding agent (custom editor, breadcrumb, footer, header)",
5
5
  "homepage": "https://github.com/jwu/pi-powerline#readme",
6
6
  "repository": {