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

Method insertContentReplacement

src/utils/sessionStorage.ts:1195–1208  ·  view source on GitHub ↗
(
    replacements: ContentReplacementRecord[],
    agentId?: AgentId,
  )

Source from the content-addressed store, hash-verified

1193 }
1194
1195 async insertContentReplacement(
1196 replacements: ContentReplacementRecord[],
1197 agentId?: AgentId,
1198 ) {
1199 return this.trackWrite(async () => {
1200 const entry: ContentReplacementEntry = {
1201 type: 'content-replacement',
1202 sessionId: getSessionId() as UUID,
1203 agentId,
1204 replacements,
1205 }
1206 await this.appendEntry(entry)
1207 })
1208 }
1209
1210 async appendEntry(entry: Entry, sessionId: UUID = getSessionId() as UUID) {
1211 if (this.shouldSkipPersistence()) {

Callers 1

recordContentReplacementFunction · 0.80

Calls 3

trackWriteMethod · 0.95
appendEntryMethod · 0.95
getSessionIdFunction · 0.85

Tested by

no test coverage detected