- Remove redundant id field from ExperimentConfig interface
- Update UI components to use experiment keys directly
- Improve type safety by using key-based mapping instead of object values
Change ExperimentId type to be value-based rather than key-based
Make experiment record types more strict with proper typing
Pass full experiment config object instead of single boolean flag
Update type definitions and usages across codebase
- Add experiments.ts to manage experimental features
- Refactor experimental diff strategy into experiments system
- Add UI components for managing experimental features
- Add tests for experimental tools
- Update system prompts to handle experiments
Implements automatic approval for mode switching operations when enabled, following
existing auto-approval patterns in the codebase.
Implementation:
- Added `alwaysAllowModeSwitch` to state management
- Updated `isAutoApproved` function in ChatView to handle mode switch requests
- Added mode switch option to AutoApproveMenu with appropriate handler
- Integrated with existing auto-approval flow
Tests:
- Added three test cases in ChatView.auto-approve.test.tsx:
1. Verifies mode switch auto-approval when enabled
2. Verifies no auto-approval when mode switch setting is disabled
3. Verifies no auto-approval when global auto-approval is disabled
The implementation follows existing patterns for other auto-approve features
(read, write, browser, etc.) to maintain consistency in the codebase.
- Only consider API requests with valid token information
- Skip messages with invalid/missing token data
- Prevent counter from resetting on action approval messages
- Ensure both tokensIn and tokensOut are valid numbers
This makes the context token counter more stable and accurate
by only updating on valid API responses with complete token data.
- Only update context tokens when both input and output tokens are non-zero
- Keep previous context token count when API calls fail
- Avoid resetting counter on partial or failed responses
This makes the context token counter more resilient against edge cases
and provides more accurate context size tracking during API failures.
- 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.
- Replace console.error with outputChannel.appendLine for better error visibility
- Add detailed error information using JSON.stringify with full error properties
- Improve error message formatting and consistency across all error handlers
Adds ability to fix code within the context of an active task instead of starting a new one. This allows for more efficient workflow when already working with Roo.
Add new FIX_IN_CURRENT_TASK code action and command
Enhance ClineProvider to support context-aware code fixing
Update tests to verify new action functionality