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

Function collectReplIds

src/utils/sessionStorage.ts:4595–4607  ·  view source on GitHub ↗
(messages: readonly Message[])

Source from the content-addressed store, hash-verified

4593}
4594
4595function collectReplIds(messages: readonly Message[]): Set<string> {
4596 const ids = new Set<string>()
4597 for (const m of messages) {
4598 if (m.type === 'assistant' && Array.isArray(m.message.content)) {
4599 for (const b of m.message.content) {
4600 if (b.type === 'tool_use' && b.name === REPL_TOOL_NAME) {
4601 ids.add(b.id)
4602 }
4603 }
4604 }
4605 }
4606 return ids
4607}
4608
4609/**
4610 * For external users, make REPL invisible in the persisted transcript: strip

Callers 1

cleanMessagesForLoggingFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected