mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
22 lines
778 B
TypeScript
22 lines
778 B
TypeScript
import type { DiffStrategy } from "./types"
|
|
import { MultiSearchReplaceDiffStrategy } from "./strategies/multi-search-replace"
|
|
import { ExperimentId } from "../../shared/experiments"
|
|
|
|
export type { DiffStrategy }
|
|
|
|
/**
|
|
* 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 type DiffStrategyName = "multi-search-and-replace"
|
|
|
|
type GetDiffStrategyOptions = {
|
|
model: string
|
|
experiments: Partial<Record<ExperimentId, boolean>>
|
|
fuzzyMatchThreshold?: number
|
|
}
|
|
|
|
export const getDiffStrategy = ({ fuzzyMatchThreshold, experiments }: GetDiffStrategyOptions): DiffStrategy =>
|
|
new MultiSearchReplaceDiffStrategy(fuzzyMatchThreshold)
|