MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / rewindToIndex

Method rewindToIndex

src/core/message-manager/index.ts:70–73  ·  view source on GitHub ↗

* 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 = {})

Source from the content-addressed store, hash-verified

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.

Callers 1

index.spec.tsFile · 0.80

Calls 1

performRewindMethod · 0.95

Tested by

no test coverage detected