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.
- Rename customPrompts to customModePrompts for mode-specific prompts
- Add new customSupportPrompts type for support action prompts
- Update types to be more specific (CustomModePrompts and CustomSupportPrompts)
- Fix all related tests and component implementations
- Added support for an experimental diff strategy in the Cline class, allowing users to opt for a new unified diff approach.
- Updated the getDiffStrategy function to accommodate the experimental strategy, adjusting the fuzzy match threshold accordingly.
- Integrated experimentalDiffStrategy into the global state management, enabling persistence across sessions.
- Enhanced the ClineProvider and related components to handle the new experimental strategy, including UI updates for user settings.
- Improved task history management to include the experimentalDiffStrategy setting, ensuring consistency in task execution.
- Updated relevant interfaces and types to reflect the new experimentalDiffStrategy property.
- Add requestDelaySeconds setting for configuring delay between retry attempts
- Add alwaysApproveResubmit option for automatic retry approval
- Add api_req_retry_delayed message type for delayed retries
- Update UI components to support new retry control settings
* Chore: Pretier for consistant formatting
- TODO: This PR needs to be updated by Saoud after he runs `npm install` & `npm format:fix` and commits the results of the prettier changes.
* Revert prettier config
* Run npm install
* Fix prettier config and ignore package lock
* Run format
---------
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>