forked from cline/cline
-
Notifications
You must be signed in to change notification settings - Fork 650
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a search-and-replace diff strategy (#57)
- Loading branch information
Showing
7 changed files
with
692 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import type { DiffStrategy } from './types' | ||
import { UnifiedDiffStrategy } from './strategies/unified' | ||
|
||
import { SearchReplaceDiffStrategy } from './strategies/search-replace' | ||
/** | ||
* Get the appropriate diff strategy for the given model | ||
* @param model The name of the model being used (e.g., 'gpt-4', 'claude-3-opus') | ||
* @returns The appropriate diff strategy for the model | ||
*/ | ||
export function getDiffStrategy(model: string): DiffStrategy { | ||
// For now, return UnifiedDiffStrategy for all models | ||
// For now, return SearchReplaceDiffStrategy for all models | ||
// This architecture allows for future optimizations based on model capabilities | ||
return new UnifiedDiffStrategy() | ||
return new SearchReplaceDiffStrategy() | ||
} | ||
|
||
export type { DiffStrategy } | ||
export { UnifiedDiffStrategy } | ||
export { UnifiedDiffStrategy, SearchReplaceDiffStrategy } |
Oops, something went wrong.