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
- Add contextTokens to ApiMetrics interface
- Calculate context size using last API request's tokens
- Display context token count in TaskHeader below total tokens
- Use exact token counts instead of character estimation
This helps users track the total size of their conversation context,
which is useful for managing context window limits.