(agentId: AgentId)
| 245 | } |
| 246 | |
| 247 | export function getAgentTranscriptPath(agentId: AgentId): string { |
| 248 | // Same sessionProjectDir consistency as getTranscriptPathForSession — |
| 249 | // subagent transcripts live under the session dir, so if the session |
| 250 | // transcript is at sessionProjectDir, subagent transcripts are too. |
| 251 | const projectDir = getSessionProjectDir() ?? getProjectDir(getOriginalCwd()) |
| 252 | const sessionId = getSessionId() |
| 253 | const subdir = agentTranscriptSubdirs.get(agentId) |
| 254 | const base = subdir |
| 255 | ? join(projectDir, sessionId, 'subagents', subdir) |
| 256 | : join(projectDir, sessionId, 'subagents') |
| 257 | return join(base, `agent-${agentId}.jsonl`) |
| 258 | } |
| 259 | |
| 260 | function getAgentMetadataPath(agentId: AgentId): string { |
| 261 | return getAgentTranscriptPath(agentId).replace(/\.jsonl$/, '.meta.json') |
no test coverage detected