mirror of
https://github.com/jarrodwatts/claude-hud.git
synced 2026-05-21 15:52:37 +00:00
Adds AUTOCOMPACT_BUFFER (45k tokens) to match /context output. This accounts for the reserved space Claude Code uses for autocompact. Changes: - Add src/constants.ts with AUTOCOMPACT_BUFFER export - Update getContextPercent to include buffer in calculation - Add edge case guard for invalid context window sizes - Update tests to use realistic 200k context sizes Closes #4 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: melon-hub <melon-hub@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>