Skip to content

Commit 6e1f683

Browse files
authored
Add a search-and-replace diff strategy (#57)
1 parent 7f764f6 commit 6e1f683

File tree

7 files changed

+692
-8
lines changed

7 files changed

+692
-8
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Roo Cline Changelog
22

3+
## [2.1.17]
4+
5+
- Switch to search/replace diffs in experimental diff editing mode
6+
7+
## [2.1.16]
8+
9+
- Allow copying prompts from the history screen
10+
311
## [2.1.15]
412

513
- Incorporate dbasclpy's [PR](https://github.com/RooVetGit/Roo-Cline/pull/54) to add support for gemini-exp-1206

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ A fork of Cline, an autonomous coding agent, with some added experimental config
44
- Auto-approval capabilities for commands, write, and browser operations
55
- Support for .clinerules per-project custom instructions
66
- Ability to run side-by-side with Cline
7-
- Code is unit-tested
7+
- Unit test coverage (written almost entirely by Roo Cline!)
88
- Support for playing sound effects
99
- Support for OpenRouter compression
1010
- Support for editing through diffs (very experimental)
1111
- Support for gemini-exp-1206
12+
- Support for copying prompts from the history screen
1213

1314
Here's an example of Roo-Cline autonomously creating a snake game with "Always approve write operations" and "Always approve browser actions" turned on:
1415

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Roo Cline",
44
"description": "A fork of Cline, an autonomous coding agent, with some added experimental configuration and automation features.",
55
"publisher": "RooVeterinaryInc",
6-
"version": "2.1.16",
6+
"version": "2.1.17",
77
"icon": "assets/icons/rocket.png",
88
"galleryBanner": {
99
"color": "#617A91",

src/core/diff/DiffStrategy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import type { DiffStrategy } from './types'
22
import { UnifiedDiffStrategy } from './strategies/unified'
3-
3+
import { SearchReplaceDiffStrategy } from './strategies/search-replace'
44
/**
55
* Get the appropriate diff strategy for the given model
66
* @param model The name of the model being used (e.g., 'gpt-4', 'claude-3-opus')
77
* @returns The appropriate diff strategy for the model
88
*/
99
export function getDiffStrategy(model: string): DiffStrategy {
10-
// For now, return UnifiedDiffStrategy for all models
10+
// For now, return SearchReplaceDiffStrategy for all models
1111
// This architecture allows for future optimizations based on model capabilities
12-
return new UnifiedDiffStrategy()
12+
return new SearchReplaceDiffStrategy()
1313
}
1414

1515
export type { DiffStrategy }
16-
export { UnifiedDiffStrategy }
16+
export { UnifiedDiffStrategy, SearchReplaceDiffStrategy }

0 commit comments

Comments
 (0)