mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 12:51:17 -05:00
17 lines
796 B
TypeScript
17 lines
796 B
TypeScript
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, debugEnabled?: boolean): DiffStrategy {
|
|
// For now, return SearchReplaceDiffStrategy for all models (with a fuzzy threshold of 0.9)
|
|
// This architecture allows for future optimizations based on model capabilities
|
|
return new SearchReplaceDiffStrategy(0.9, debugEnabled)
|
|
}
|
|
|
|
export type { DiffStrategy }
|
|
export { UnifiedDiffStrategy, SearchReplaceDiffStrategy }
|