- Add new command registration and menu item
- Add new code action type and command ID
- Add support prompt config for adding code to context
- Add message handling in webview for setting chat box content
- Add logic to append selected code to existing chat input
- Create EditorUtils class to centralize shared editor functionality
- Remove duplicated code between CodeActionProvider and command handlers
- Improve command handling to work consistently for both code actions and direct commands
- Add better type safety and error handling for editor operations
Replace Create React App with Vite build system
Add ESLint configuration and improve TypeScript types
Create VSCode UI component mocks for better testing
Update test files with proper async handling
Add Tailwind CSS integration
Fix accessibility by adding ARIA roles
Maintains the last valid context token count between API requests by:
- Adding tracking of last valid context tokens
- Using last known value as fallback when current request lacks token data
- Only updating when new valid token counts are available
This prevents the context counter from flickering to "-" during tool calls
and API request transitions, improving the UI stability.
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
Adds the current conversation's context token count to the environment details section by:
- Using existing getApiMetrics() to retrieve contextTokens from the last API request
- Adding a new "Context Tokens" section between "Current Time" and "Current Mode"
- Formatting the token count with toLocaleString() for better readability
- Showing "(Not available)" when no context tokens are present
This provides visibility into the current conversation's token usage directly in the environment details, helping track context window utilization.