* Rewind conversation to a specific index in clineMessages. * Keeps messages [0, toIndex) and removes [toIndex, end]. * * @param toIndex - The index to rewind to (exclusive) * @param options - Rewind options
(toIndex: number, options: RewindOptions = {})
| 68 | * @param options - Rewind options |
| 69 | */ |
| 70 | async rewindToIndex(toIndex: number, options: RewindOptions = {}): Promise<void> { |
| 71 | const cutoffTs = this.task.clineMessages[toIndex]?.ts ?? Date.now() |
| 72 | await this.performRewind(toIndex, cutoffTs, options) |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Internal method that performs the actual rewind operation. |
no test coverage detected