New Roo Tool insert and search replace tools - #538
Conversation
|
There was a problem hiding this comment.
Consider adding validation to ensure that indices in insertGroups are within the bounds of the original array and are non-negative. This will prevent potential errors or unexpected behavior.
03bfee4 to
9750f91
Compare
There was a problem hiding this comment.
In general I'm curious why this doesn't just look at the extension state like the other settings
|
Nice, left some comments but this definitely seems like a step in the right direction for managing these experiments! |
909d4c0 to
42a1e99
Compare
| setEnhancementApiConfigId: (value: string) => void | ||
| experimentalDiffStrategy: boolean | ||
| setExperimentalDiffStrategy: (value: boolean) => void | ||
| autoApprovalEnabled?: boolean |
There was a problem hiding this comment.
Is this removal intentional?
There was a problem hiding this comment.
yes, it's intentional because ExtensionStateContextType extend ExtensionState, and autoApprovalEnabled still have in that ExtensionState, so i clean up a bit
- 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
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
- 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
6e34a69 to
411182a
Compare
| - Some modes have restrictions on which files they can edit. If you attempt to edit a restricted file, the operation will be rejected with a FileRestrictionError that will specify which file patterns are allowed for the current mode. | ||
| - Be sure to consider the type of project (e.g. Python, JavaScript, web application) when determining the appropriate structure and files to include. Also consider what files may be most relevant to accomplishing the task, for example looking at a project's manifest file would help you understand the project's dependencies, which you could incorporate into any code you write. | ||
| * For example, in architect mode trying to edit app.js would be rejected because architect mode can only edit files matching "\\.md$" | ||
| - Be sure to consider the type of project (e.g. Python, JavaScript, web application) when determining the appropriate structure and files to include. Also consider what files may be most relevant to accomplishing the task, for example looking at a project's manifest file would help you understand the project's dependencies, which you could incorporate into any code you write. |
There was a problem hiding this comment.
This was a duplicate of two lines up
| const settingsDir = context ? path.join(context.globalStorageUri.fsPath, "settings") : "<settings directory>" | ||
| const customModesPath = path.join(settingsDir, "cline_custom_modes.json") |
Description
New two tool that insert code block and search and replace term with regex
both two tool support multiple operations
Type of change
How Has This Been Tested?
Checklist:
Additional context
Related Issues
Reviewers
Important
Introduce
insert_code_blockandsearch_and_replacetools with experimental feature toggles and corresponding tests and UI updates.insert_code_blocktool for inserting code blocks at specific lines inCline.ts.search_and_replacetool for regex-based search and replace inCline.ts.insert_code_blockandsearch_and_replaceintools/index.ts.experiments.tsandSettingsView.tsx.system.test.tsandClineProvider.test.ts.SettingsView.tsxto include checkboxes for enabling experimental tools.This description was created by
for 909d4c098128efb56b3cfe2add1e73cc135e155f. It will automatically update as commits are pushed.