(agent: AgentDefinition)
| 133 | * Gets the actual relative file path for an agent (handles filename vs agentType mismatch) |
| 134 | */ |
| 135 | export 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 |
no test coverage detected