MCPcopy Create free account
hub / github.com/WJX20/claude-code / getActualRelativeAgentFilePath

Function getActualRelativeAgentFilePath

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

Source from the content-addressed store, hash-verified

133 * Gets the actual relative file path for an agent (handles filename vs agentType mismatch)
134 */
135export function getActualRelativeAgentFilePath(agent: AgentDefinition): string {
136 if (isBuiltInAgent(agent)) {
137 return 'Built-in'
138 }
139 if (isPluginAgent(agent)) {
140 return `Plugin: ${agent.plugin || 'Unknown'}`
141 }
142 if (agent.source === 'flagSettings') {
143 return 'CLI argument'
144 }
145
146 const dirPath = getRelativeAgentDirectoryPath(agent.source)
147 const filename = agent.filename || agent.agentType
148 return join(dirPath, `${filename}.md`)
149}
150
151/**
152 * Ensures the directory for an agent location exists

Callers 1

AgentDetailFunction · 0.85

Calls 3

isBuiltInAgentFunction · 0.85
isPluginAgentFunction · 0.85

Tested by

no test coverage detected