fix: update tests to handle new experimental diff option and increase the default confidence to 1

This commit is contained in:
Daniel Riccio
2025-01-15 12:23:51 -05:00
parent 22069e8056
commit 6c8d7f4951
6 changed files with 16 additions and 13 deletions

View File

@@ -107,8 +107,12 @@ export class Cline {
task?: string | undefined,
images?: string[] | undefined,
historyItem?: HistoryItem | undefined,
experimentalDiffStrategy?: boolean,
experimentalDiffStrategy: boolean = false,
) {
if (!task && !images && !historyItem) {
throw new Error('Either historyItem or task/images must be provided');
}
this.taskId = crypto.randomUUID()
this.api = buildApiHandler(apiConfiguration)
this.terminalManager = new TerminalManager()
@@ -119,7 +123,7 @@ export class Cline {
// Prioritize experimentalDiffStrategy from history item if available
const effectiveExperimentalDiffStrategy = historyItem?.experimentalDiffStrategy ?? experimentalDiffStrategy
this.diffStrategy = getDiffStrategy(this.api.getModel().id, fuzzyMatchThreshold, effectiveExperimentalDiffStrategy)
this.diffStrategy = getDiffStrategy(this.api.getModel().id, fuzzyMatchThreshold ?? 1.0, effectiveExperimentalDiffStrategy)
this.diffViewProvider = new DiffViewProvider(cwd)
this.providerRef = new WeakRef(provider)