MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / incrementPromptCount

Function incrementPromptCount

source code/utils/commitAttribution.ts:952–963  ·  view source on GitHub ↗
(
  attribution: AttributionState,
  saveSnapshot: (snapshot: AttributionSnapshotMessage) => void,
)

Source from the content-addressed store, hash-verified

950 * @returns New attribution state with incremented promptCount
951 */
952export function incrementPromptCount(
953 attribution: AttributionState,
954 saveSnapshot: (snapshot: AttributionSnapshotMessage) => void,
955): AttributionState {
956 const newAttribution = {
957 ...attribution,
958 promptCount: attribution.promptCount + 1,
959 }
960 const snapshot = stateToSnapshotMessage(newAttribution, randomUUID())
961 saveSnapshot(snapshot)
962 return newAttribution
963}

Callers 2

REPLFunction · 0.85
runHeadlessStreamingFunction · 0.85

Calls 1

stateToSnapshotMessageFunction · 0.85

Tested by

no test coverage detected