Commit Graph

9 Commits

Author SHA1 Message Date
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
Murilo Pires
1ba632fe89 Update webview-ui/src/components/chat/TaskHeader.tsx
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-01-28 00:39:40 -03:00
MFPires
e668169ed9 feat: Add conversation context token counter
- 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.
2025-01-27 23:02:25 -03:00
Saoud Rizwan
39bc35eec1 Add LM Studio provider 2024-11-12 22:02:42 -05:00
Saoud Rizwan
34f160b35a Cleanup 2024-10-09 01:49:59 -04:00
Saoud Rizwan
d67523596b Refactor ClineMessage 2024-10-09 01:49:59 -04:00
Saoud Rizwan
e1ab10f24e Format large numbers to use k or m 2024-10-09 01:49:56 -04:00
Saoud Rizwan
59c188019a Get openrouter streaming working 2024-10-09 01:49:55 -04:00
Saoud Rizwan
6fe9ed22b0 Refactor web components 2024-09-24 11:54:19 -04:00