MCPcopy
hub / github.com/codeaashu/claude-code / removeLastFromHistory

Function removeLastFromHistory

src/history.ts:453–464  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

451 * entry so a second call is a no-op.
452 */
453export function removeLastFromHistory(): void {
454 if (!lastAddedEntry) return
455 const entry = lastAddedEntry
456 lastAddedEntry = null
457
458 const idx = pendingEntries.lastIndexOf(entry)
459 if (idx !== -1) {
460 pendingEntries.splice(idx, 1)
461 } else {
462 skippedTimestamps.add(entry.timestamp)
463 }
464}
465

Callers 1

REPLFunction · 0.85

Calls 2

spliceMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected