@owloops/claude-powerline 1.5.6 → 1.6.1

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/dist/index.js CHANGED
@@ -2329,7 +2329,7 @@ var PowerlineRenderer = class {
2329
2329
  return this.segmentRenderer.renderModel(hookData, colors);
2330
2330
  case "session":
2331
2331
  if (!usageInfo) return null;
2332
- const usageType = this.config.usageType || segment.config?.type || "cost";
2332
+ const usageType = segment.config?.type || "cost";
2333
2333
  return this.segmentRenderer.renderSession(usageInfo, colors, usageType);
2334
2334
  case "tmux":
2335
2335
  if (!this.needsTmuxInfo()) return null;
@@ -2357,7 +2357,11 @@ var PowerlineRenderer = class {
2357
2357
  case "version":
2358
2358
  if (!versionInfo) return null;
2359
2359
  const versionConfig = segment.config;
2360
- return this.segmentRenderer.renderVersion(versionInfo, colors, versionConfig);
2360
+ return this.segmentRenderer.renderVersion(
2361
+ versionInfo,
2362
+ colors,
2363
+ versionConfig
2364
+ );
2361
2365
  default:
2362
2366
  return null;
2363
2367
  }
@@ -2519,7 +2523,7 @@ var DEFAULT_CONFIG = {
2519
2523
  segments: {
2520
2524
  directory: {
2521
2525
  enabled: true,
2522
- showBasename: false
2526
+ showBasename: true
2523
2527
  },
2524
2528
  git: {
2525
2529
  enabled: true,
@@ -2536,6 +2540,7 @@ var DEFAULT_CONFIG = {
2536
2540
  session: { enabled: true, type: "tokens" },
2537
2541
  today: { enabled: false, type: "cost" },
2538
2542
  block: { enabled: true, type: "cost", burnType: "cost" },
2543
+ version: { enabled: false },
2539
2544
  tmux: { enabled: false },
2540
2545
  context: { enabled: true },
2541
2546
  metrics: {
@@ -2574,9 +2579,6 @@ function isValidTheme(theme) {
2574
2579
  function isValidStyle(style) {
2575
2580
  return style === "minimal" || style === "powerline";
2576
2581
  }
2577
- function isValidUsageType(usageType) {
2578
- return ["cost", "tokens", "both", "breakdown"].includes(usageType);
2579
- }
2580
2582
  function deepMerge(target, source) {
2581
2583
  const result = { ...target };
2582
2584
  for (const key in source) {
@@ -2635,22 +2637,6 @@ function loadEnvConfig() {
2635
2637
  display.style = "minimal";
2636
2638
  }
2637
2639
  }
2638
- const usageType = process.env.CLAUDE_POWERLINE_USAGE_TYPE;
2639
- if (usageType && isValidUsageType(usageType)) {
2640
- config.usageType = usageType;
2641
- }
2642
- const sessionBudgetStr = process.env.CLAUDE_POWERLINE_SESSION_BUDGET;
2643
- if (sessionBudgetStr) {
2644
- const sessionBudget = parseFloat(sessionBudgetStr);
2645
- if (!isNaN(sessionBudget) && sessionBudget > 0) {
2646
- config.budget = {
2647
- session: {
2648
- ...DEFAULT_CONFIG.budget?.session,
2649
- amount: sessionBudget
2650
- }
2651
- };
2652
- }
2653
- }
2654
2640
  if (Object.keys(display).length > 0) {
2655
2641
  config.display = display;
2656
2642
  }
@@ -2677,22 +2663,6 @@ function parseCLIOverrides(args) {
2677
2663
  display.style = "minimal";
2678
2664
  }
2679
2665
  }
2680
- const usageType = args.find((arg) => arg.startsWith("--usage="))?.split("=")[1];
2681
- if (usageType && isValidUsageType(usageType)) {
2682
- config.usageType = usageType;
2683
- }
2684
- const sessionBudgetStr = args.find((arg) => arg.startsWith("--session-budget="))?.split("=")[1];
2685
- if (sessionBudgetStr) {
2686
- const sessionBudget = parseFloat(sessionBudgetStr);
2687
- if (!isNaN(sessionBudget) && sessionBudget > 0) {
2688
- config.budget = {
2689
- session: {
2690
- ...DEFAULT_CONFIG.budget?.session,
2691
- amount: sessionBudget
2692
- }
2693
- };
2694
- }
2695
- }
2696
2666
  if (Object.keys(display).length > 0) {
2697
2667
  config.display = display;
2698
2668
  }
@@ -2835,29 +2805,10 @@ Debugging:
2835
2805
  Claude Code Options (for settings.json):
2836
2806
  --theme=THEME Set theme: dark, light, nord, tokyo-night, rose-pine, custom
2837
2807
  --style=STYLE Set separator style: minimal, powerline
2838
- --usage=TYPE Usage display: cost, tokens, both, breakdown
2839
- --session-budget=AMOUNT Set session budget for percentage tracking
2840
2808
  --config=PATH Use custom config file path
2841
2809
 
2842
- Configuration:
2843
- Config files are loaded in this order (highest priority first):
2844
- 1. CLI arguments (--theme, --style, --usage, --config)
2845
- 2. Environment variables (CLAUDE_POWERLINE_THEME, CLAUDE_POWERLINE_STYLE, CLAUDE_POWERLINE_USAGE_TYPE, CLAUDE_POWERLINE_CONFIG)
2846
- 3. ./.claude-powerline.json (project)
2847
- 4. ~/.claude/claude-powerline.json (user)
2848
- 5. ~/.config/claude-powerline/config.json (XDG)
2849
-
2850
- Creating a config file:
2851
- Copy example from: https://github.com/Owloops/claude-powerline/blob/main/.claude-powerline.json
2810
+ See example config at: https://github.com/Owloops/claude-powerline/blob/main/.claude-powerline.json
2852
2811
 
2853
- Usage in Claude Code settings.json:
2854
- {
2855
- "statusLine": {
2856
- "type": "command",
2857
- "command": "claude-powerline",
2858
- "padding": 0
2859
- }
2860
- }
2861
2812
  `);
2862
2813
  process2.exit(0);
2863
2814
  }
@@ -2895,8 +2846,6 @@ Usage: claude-powerline [options]
2895
2846
  Options:
2896
2847
  --theme=THEME Set theme: dark, light, nord, tokyo-night, rose-pine, custom
2897
2848
  --style=STYLE Set separator style: minimal, powerline
2898
- --usage=TYPE Usage display: cost, tokens, both, breakdown
2899
- --session-budget=AMOUNT Set session budget for percentage tracking
2900
2849
  --config=PATH Use custom config file path
2901
2850
  --install-fonts Install powerline fonts to system
2902
2851
  -h, --help Show this help