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

Function resolveAgentTranscriptPath

src/utils/sessionStorage.ts:286–301  ·  view source on GitHub ↗
(agentId: AgentId)

Source from the content-addressed store, hash-verified

284}
285
286async function resolveAgentTranscriptPath(agentId: AgentId): Promise<string> {
287 const directPath = getAgentTranscriptPath(agentId)
288 try {
289 await stat(directPath)
290 return directPath
291 } catch (e) {
292 if (!isFsInaccessible(e)) throw e
293 }
294
295 const projectDir = getSessionProjectDir() ?? getProjectDir(getOriginalCwd())
296 const subagentsDir = join(projectDir, getSessionId(), 'subagents')
297 return (
298 (await findNestedAgentFilePath(subagentsDir, `agent-${agentId}.jsonl`)) ??
299 directPath
300 )
301}
302
303async function getAgentMetadataPath(agentId: AgentId): Promise<string> {
304 return (await resolveAgentTranscriptPath(agentId)).replace(

Callers 2

getAgentMetadataPathFunction · 0.85
getAgentTranscriptFunction · 0.85

Calls 8

getAgentTranscriptPathFunction · 0.85
statFunction · 0.85
isFsInaccessibleFunction · 0.85
getSessionProjectDirFunction · 0.85
getOriginalCwdFunction · 0.85
getSessionIdFunction · 0.85
findNestedAgentFilePathFunction · 0.85
getProjectDirFunction · 0.70

Tested by

no test coverage detected