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

Function getAgentDirectoryPath

src/components/agents/agentFileUtils.ts:60–77  ·  view source on GitHub ↗

* Gets the directory path for an agent location

(location: SettingSource)

Source from the content-addressed store, hash-verified

58 * Gets the directory path for an agent location
59 */
60function getAgentDirectoryPath(location: SettingSource): string {
61 switch (location) {
62 case 'flagSettings':
63 throw new Error(`Cannot get directory path for ${location} agents`)
64 case 'userSettings':
65 return join(getClaudeConfigHomeDir(), AGENT_PATHS.AGENTS_DIR)
66 case 'projectSettings':
67 return join(getCwd(), AGENT_PATHS.FOLDER_NAME, AGENT_PATHS.AGENTS_DIR)
68 case 'policySettings':
69 return join(
70 getManagedFilePath(),
71 AGENT_PATHS.FOLDER_NAME,
72 AGENT_PATHS.AGENTS_DIR,
73 )
74 case 'localSettings':
75 return join(getCwd(), AGENT_PATHS.FOLDER_NAME, AGENT_PATHS.AGENTS_DIR)
76 }
77}
78
79function getRelativeAgentDirectoryPath(location: SettingSource): string {
80 switch (location) {

Callers 4

getNewAgentFilePathFunction · 0.85
getActualAgentFilePathFunction · 0.85

Calls 1

getCwdFunction · 0.85

Tested by

no test coverage detected