MCPcopy Create free account
hub / github.com/freecodexyz/free-code / incrementPromptCount

Function incrementPromptCount

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

Source from the content-addressed store, hash-verified

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

Callers 2

REPLFunction · 0.85
runHeadlessStreamingFunction · 0.85

Calls 1

stateToSnapshotMessageFunction · 0.85

Tested by

no test coverage detected