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

Function getPlan

src/utils/plans.ts:135–144  ·  view source on GitHub ↗
(agentId?: AgentId)

Source from the content-addressed store, hash-verified

133 * @param agentId Optional agent ID for subagents. If not provided, returns main session plan.
134 */
135export function getPlan(agentId?: AgentId): string | null {
136 const filePath = getPlanFilePath(agentId)
137 try {
138 return getFsImplementation().readFileSync(filePath, { encoding: 'utf-8' })
139 } catch (error) {
140 if (isENOENT(error)) return null
141 logError(error)
142 return null
143 }
144}
145
146/**
147 * Extract the plan slug from a log's message history.

Callers 11

callFunction · 0.85
getPlanModeAttachmentsFunction · 0.85
normalizeToolInputFunction · 0.85
callFunction · 0.85

Calls 4

getPlanFilePathFunction · 0.85
getFsImplementationFunction · 0.85
isENOENTFunction · 0.85
logErrorFunction · 0.70

Tested by

no test coverage detected