Skip to content

feat: add claudeStatus.statusBar.format for configurable status bar display#36

Merged
long-910 merged 6 commits into
mainfrom
feat/configurable-status-bar-format
Jun 13, 2026
Merged

feat: add claudeStatus.statusBar.format for configurable status bar display#36
long-910 merged 6 commits into
mainfrom
feat/configurable-status-bar-format

Conversation

@long-910

Copy link
Copy Markdown
Owner

Summary

  • Adds new setting claudeStatus.statusBar.format (type string | null, default null)
  • When set, replaces the auto-generated status bar label with a user-defined template string
  • Supports 5 placeholders: ${usage5h}, ${usage7d}, ${cost5h}, ${cost7d}, ${costDay}
  • Falls back to default label for no-credentials and no-data states (error states always show the standard messages)
  • Includes EN / JA / ZH-CN descriptions in NLS files

Example configuration:

"claudeStatus.statusBar.format": "Claude Usage 5h:${usage5h}% 7d:${usage7d}%"

Renders as: Claude Usage 5h:35% 7d:35%

Available placeholders:

Placeholder Value
${usage5h} 5h utilization as integer 0–100
${usage7d} 7d utilization as integer 0–100
${cost5h} 5h USD cost (e.g. 1.23)
${cost7d} 7d USD cost
${costDay} Today's USD cost

Test plan

  • Set claudeStatus.statusBar.format to "Claude Usage 5h:${usage5h}% 7d:${usage7d}%" and verify status bar renders correctly
  • Set format with cost placeholders "5h:$${cost5h} today:$${costDay}" and verify values
  • Leave format as null (default) — verify existing behavior unchanged
  • Simulate no-credentials / no-data state — verify default error messages are shown regardless of format setting
  • Run npm run lint && npm test

Closes #35

long-910 added 6 commits June 13, 2026 12:05
…isplay

Add a new setting claudeStatus.statusBar.format that accepts a template
string with placeholders: \${usage5h}, \${usage7d}, \${cost5h}, \${cost7d},
\${costDay}. When set, the custom format replaces the default auto-generated
label. Falls back to default for no-credentials / no-data states.

Closes #35
@long-910 long-910 merged commit 780a1a9 into main Jun 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configurable status bar format

1 participant