refactor: remove experimental diff from history since we are using the state

This commit is contained in:
Daniel Riccio
2025-01-16 23:49:11 -05:00
parent 808fa5f8e0
commit 815c266fec
2 changed files with 2 additions and 10 deletions

View File

@@ -1989,17 +1989,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
const history = (await this.getGlobalState("taskHistory") as HistoryItem[] | undefined) || []
const existingItemIndex = history.findIndex((h) => h.id === item.id)
// Ensure experimentalDiffStrategy is included from current settings if not already set
const { experimentalDiffStrategy } = await this.getState() ?? {}
const updatedItem = {
...item,
experimentalDiffStrategy: item.experimentalDiffStrategy ?? experimentalDiffStrategy
}
if (existingItemIndex !== -1) {
history[existingItemIndex] = updatedItem
history[existingItemIndex] = item
} else {
history.push(updatedItem)
history.push(item)
}
await this.updateGlobalState("taskHistory", history)
return history

View File

@@ -7,5 +7,4 @@ export type HistoryItem = {
cacheWrites?: number
cacheReads?: number
totalCost: number
experimentalDiffStrategy?: boolean
}