Skip to content

Add context percentage segment on right side with left arrows#10

Merged
tylergraydev merged 1 commit into
tylergraydev:mainfrom
knowsuchagency:add-context-at-the-end-ya1z
Jan 1, 2026
Merged

Add context percentage segment on right side with left arrows#10
tylergraydev merged 1 commit into
tylergraydev:mainfrom
knowsuchagency:add-context-at-the-end-ya1z

Conversation

@knowsuchagency

@knowsuchagency knowsuchagency commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Adds context window usage percentage display at the end of the limitline
  • Uses left-pointing powerline arrows (vim statusline style)
  • Context percentage calculated from hook data token counts

Changes

  • Add context_window field to ClaudeHookData type
  • Add contextPercent calculation to EnvironmentInfo
  • Add context color to all themes (dark, light, nord, gruvbox, tokyo-night, rose-pine)
  • Add renderRightPowerline() for right-side segments with left arrows
  • Context segment always appears on right side, enabled by default

Visual Result

 dir > branch > model > block > weekly  < ◐ 25% 
└────────── left side ──────────────┘   └─ right ─┘
           (→ arrows)                    (← arrow)

Display context window usage at the end of the limitline using
left-pointing powerline arrows (vim statusline style). The context
percentage is calculated from hook data token counts.

Changes:
- Add context_window field to ClaudeHookData type
- Add contextPercent calculation to EnvironmentInfo
- Add context color to all themes (dark, light, nord, gruvbox, etc.)
- Add renderRightPowerline() for right-side segments with left arrows
- Context segment always appears on right side, enabled by default
@tylergraydev
tylergraydev merged commit c3f1c6f into tylergraydev:main Jan 1, 2026
0 of 3 checks passed
tylergraydev added a commit that referenced this pull request Jan 1, 2026
Add contextPercent to test fixtures after PR #10 added the context
segment feature to EnvironmentInfo type.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants