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

Function loadSubagentTranscripts

src/utils/sessionStorage.ts:4523–4548  ·  view source on GitHub ↗
(
  agentIds: string[],
)

Source from the content-addressed store, hash-verified

4521 * Load subagent transcripts for the given agent IDs
4522 */
4523export async function loadSubagentTranscripts(
4524 agentIds: string[],
4525): Promise<{ [agentId: string]: Message[] }> {
4526 const results = await Promise.all(
4527 agentIds.map(async agentId => {
4528 try {
4529 const result = await getAgentTranscript(asAgentId(agentId))
4530 if (result && result.messages.length > 0) {
4531 return { agentId, transcript: result.messages }
4532 }
4533 return null
4534 } catch {
4535 // Skip if transcript can't be loaded
4536 return null
4537 }
4538 }),
4539 )
4540
4541 const transcripts: { [agentId: string]: Message[] } = {}
4542 for (const result of results) {
4543 if (result) {
4544 transcripts[result.agentId] = result.transcript
4545 }
4546 }
4547 return transcripts
4548}
4549
4550// Globs the session's subagents dir directly — unlike AppState.tasks, this survives task eviction.
4551export async function loadAllSubagentTranscriptsFromDisk(): Promise<{

Callers 2

submitTranscriptShareFunction · 0.85

Calls 2

getAgentTranscriptFunction · 0.85
asAgentIdFunction · 0.85

Tested by

no test coverage detected