|
Navi Code TUI: context-window fill gauge in the status bar
Add a ContextFill widget to the bottom StatusBar showing how full the LLM context window is (absolute tokens + percent), colored by fill level: dim < 70%, warning 70-89%, error >= 90%. Updates from stream_end and compression_started/context_compressed events; seeded from get_session on resume so the gauge isn't blank pre-turn. None from the backend keeps the last known value. Fix: name the widget attribute _ctx_fill, not _context — _context shadows MessagePump._context (the internal context manager Textual wraps around message processing) and hangs the app's message pump at mount time. Polish: drop the "ctx " prefix (shows 12.0k/32.0k · 38%) and add a 1-char margin between the activity indicator and the gauge. Co-Authored-By: Claude <noreply@anthropic.com> |
|---|
|
|
| clients/terminal/tui/tui_app.py |
|---|
| clients/terminal/tui/widgets/status_bar.py |
|---|
| tests/clients/test_tui_app.py |
|---|