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

Function incrementPromptCount

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

Source from the content-addressed store, hash-verified

889 * @returns New attribution state with incremented promptCount
890 */
891export function incrementPromptCount(
892 attribution: AttributionState,
893 saveSnapshot: (snapshot: AttributionSnapshotMessage) => void,
894): AttributionState {
895 const newAttribution = {
896 ...attribution,
897 promptCount: attribution.promptCount + 1,
898 }
899 const snapshot = stateToSnapshotMessage(newAttribution, randomUUID())
900 saveSnapshot(snapshot)
901 return newAttribution
902}

Callers 2

REPLFunction · 0.85
runHeadlessStreamingFunction · 0.85

Calls 2

randomUUIDFunction · 0.90
stateToSnapshotMessageFunction · 0.85

Tested by

no test coverage detected