Files
Roo-Code/webview-ui/src/components/chat/TaskHeader.tsx
MFPires ea6dc7c16e feat(ui): add context window percentage to task header
Display the percentage of total context window used alongside token count in the task header. This helps users better understand their context usage relative to the model's capacity.

Implementation details:
- Retrieve model's context window size from normalized API configuration
- Calculate percentage of context window used based on current context tokens
- Display percentage in parentheses next to token count (e.g. "40,000 (20%)")
- Default to context window size of 1 if model info is unavailable
- Format numbers with commas for better readability
2025-01-28 16:33:06 -03:00

13 KiB