mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
refactor: remove experimental diff from history since we are using the state
This commit is contained in:
@@ -1989,17 +1989,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
|
|||||||
const history = (await this.getGlobalState("taskHistory") as HistoryItem[] | undefined) || []
|
const history = (await this.getGlobalState("taskHistory") as HistoryItem[] | undefined) || []
|
||||||
const existingItemIndex = history.findIndex((h) => h.id === item.id)
|
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) {
|
if (existingItemIndex !== -1) {
|
||||||
history[existingItemIndex] = updatedItem
|
history[existingItemIndex] = item
|
||||||
} else {
|
} else {
|
||||||
history.push(updatedItem)
|
history.push(item)
|
||||||
}
|
}
|
||||||
await this.updateGlobalState("taskHistory", history)
|
await this.updateGlobalState("taskHistory", history)
|
||||||
return history
|
return history
|
||||||
|
|||||||
@@ -7,5 +7,4 @@ export type HistoryItem = {
|
|||||||
cacheWrites?: number
|
cacheWrites?: number
|
||||||
cacheReads?: number
|
cacheReads?: number
|
||||||
totalCost: number
|
totalCost: number
|
||||||
experimentalDiffStrategy?: boolean
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user