MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / loadSubagentTranscripts

Function loadSubagentTranscripts

source code/utils/sessionStorage.ts:4299–4324  ·  view source on GitHub ↗
(
  agentIds: string[],
)

Source from the content-addressed store, hash-verified

4297 * Load subagent transcripts for the given agent IDs
4298 */
4299export async function loadSubagentTranscripts(
4300 agentIds: string[],
4301): Promise<{ [agentId: string]: Message[] }> {
4302 const results = await Promise.all(
4303 agentIds.map(async agentId => {
4304 try {
4305 const result = await getAgentTranscript(asAgentId(agentId))
4306 if (result && result.messages.length > 0) {
4307 return { agentId, transcript: result.messages }
4308 }
4309 return null
4310 } catch {
4311 // Skip if transcript can't be loaded
4312 return null
4313 }
4314 }),
4315 )
4316
4317 const transcripts: { [agentId: string]: Message[] } = {}
4318 for (const result of results) {
4319 if (result) {
4320 transcripts[result.agentId] = result.transcript
4321 }
4322 }
4323 return transcripts
4324}
4325
4326// Globs the session's subagents dir directly — unlike AppState.tasks, this survives task eviction.
4327export async function loadAllSubagentTranscriptsFromDisk(): Promise<{

Callers 2

submitTranscriptShareFunction · 0.85

Calls 2

getAgentTranscriptFunction · 0.85
asAgentIdFunction · 0.85

Tested by

no test coverage detected