MCPcopy
hub / github.com/codeaashu/claude-code / extractTeammateTranscriptsFromTasks

Function extractTeammateTranscriptsFromTasks

src/utils/sessionStorage.ts:4271–4292  ·  view source on GitHub ↗
(tasks: {
  [taskId: string]: {
    type: string
    identity?: { agentId: string }
    messages?: Message[]
  }
})

Source from the content-addressed store, hash-verified

4269 * uses a random agentId for transcript storage.
4270 */
4271export function extractTeammateTranscriptsFromTasks(tasks: {
4272 [taskId: string]: {
4273 type: string
4274 identity?: { agentId: string }
4275 messages?: Message[]
4276 }
4277}): { [agentId: string]: Message[] } {
4278 const transcripts: { [agentId: string]: Message[] } = {}
4279
4280 for (const task of Object.values(tasks)) {
4281 if (
4282 task.type === 'in_process_teammate' &&
4283 task.identity?.agentId &&
4284 task.messages &&
4285 task.messages.length > 0
4286 ) {
4287 transcripts[task.identity.agentId] = task.messages
4288 }
4289 }
4290
4291 return transcripts
4292}
4293
4294/**
4295 * Load subagent transcripts for the given agent IDs

Callers 1

FeedbackFunction · 0.85

Calls 1

valuesMethod · 0.80

Tested by

no test coverage detected