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

Function getActualAgentFilePath

src/components/agents/agentFileUtils.ts:104–115  ·  view source on GitHub ↗
(agent: AgentDefinition)

Source from the content-addressed store, hash-verified

102 * Always use this for existing agents to get their real file location
103 */
104export function getActualAgentFilePath(agent: AgentDefinition): string {
105 if (agent.source === 'built-in') {
106 return 'Built-in'
107 }
108 if (agent.source === 'plugin') {
109 throw new Error('Cannot get file path for plugin agents')
110 }
111
112 const dirPath = getAgentDirectoryPath(agent.source)
113 const filename = agent.filename || agent.agentType
114 return join(dirPath, `${filename}.md`)
115}
116
117/**
118 * Gets the relative file path for a new agent based on its name

Callers 3

AgentEditorFunction · 0.85
updateAgentFileFunction · 0.85
deleteAgentFromFileFunction · 0.85

Calls 1

getAgentDirectoryPathFunction · 0.85

Tested by

no test coverage detected