MCPcopy Create free account
hub / github.com/HELPMEEADICE/doge-code / loadSubagentTranscripts

Function loadSubagentTranscripts

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

Source from the content-addressed store, hash-verified

4341 * Load subagent transcripts for the given agent IDs
4342 */
4343export async function loadSubagentTranscripts(
4344 agentIds: string[],
4345): Promise<{ [agentId: string]: Message[] }> {
4346 const results = await Promise.all(
4347 agentIds.map(async agentId => {
4348 try {
4349 const result = await getAgentTranscript(asAgentId(agentId))
4350 if (result && result.messages.length > 0) {
4351 return { agentId, transcript: result.messages }
4352 }
4353 return null
4354 } catch {
4355 // Skip if transcript can't be loaded
4356 return null
4357 }
4358 }),
4359 )
4360
4361 const transcripts: { [agentId: string]: Message[] } = {}
4362 for (const result of results) {
4363 if (result) {
4364 transcripts[result.agentId] = result.transcript
4365 }
4366 }
4367 return transcripts
4368}
4369
4370// Globs the session's subagents dir directly — unlike AppState.tasks, this survives task eviction.
4371export async function loadAllSubagentTranscriptsFromDisk(): Promise<{

Callers 2

submitTranscriptShareFunction · 0.85

Calls 2

getAgentTranscriptFunction · 0.85
asAgentIdFunction · 0.85

Tested by

no test coverage detected