MCPcopy Create free account
hub / github.com/WJX20/claude-code / insertContentReplacement

Method insertContentReplacement

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

Source from the content-addressed store, hash-verified

1112 }
1113
1114 async insertContentReplacement(
1115 replacements: ContentReplacementRecord[],
1116 agentId?: AgentId,
1117 ) {
1118 return this.trackWrite(async () => {
1119 const entry: ContentReplacementEntry = {
1120 type: 'content-replacement',
1121 sessionId: getSessionId() as UUID,
1122 agentId,
1123 replacements,
1124 }
1125 await this.appendEntry(entry)
1126 })
1127 }
1128
1129 async appendEntry(entry: Entry, sessionId: UUID = getSessionId() as UUID) {
1130 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