MCPcopy Index your code
hub / github.com/codeaashu/claude-code / loadSubagentTranscripts

Function loadSubagentTranscripts

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

Source from the content-addressed store, hash-verified

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

Callers 2

submitTranscriptShareFunction · 0.85

Calls 2

getAgentTranscriptFunction · 0.85
asAgentIdFunction · 0.85

Tested by

no test coverage detected