MCPcopy Create free account
hub / github.com/Noumena-Network/code / getLegacyAgentDirectoryPath

Function getLegacyAgentDirectoryPath

src/components/agents/agentFileUtils.ts:91–116  ·  view source on GitHub ↗
(location: SettingSource)

Source from the content-addressed store, hash-verified

89}
90
91function getLegacyAgentDirectoryPath(location: SettingSource): string {
92 switch (location) {
93 case 'flagSettings':
94 throw new Error(`Cannot get directory path for ${location} agents`)
95 case 'userSettings':
96 return join(getLegacyClaudeConfigHomeDir(), AGENT_PATHS.AGENTS_DIR)
97 case 'projectSettings':
98 return join(
99 getCwd(),
100 AGENT_PATHS.LEGACY_FOLDER_NAME,
101 AGENT_PATHS.AGENTS_DIR,
102 )
103 case 'policySettings':
104 return join(
105 getManagedFilePath(),
106 AGENT_PATHS.LEGACY_FOLDER_NAME,
107 AGENT_PATHS.AGENTS_DIR,
108 )
109 case 'localSettings':
110 return join(
111 getCwd(),
112 AGENT_PATHS.LEGACY_FOLDER_NAME,
113 AGENT_PATHS.AGENTS_DIR,
114 )
115 }
116}
117
118function getAgentDirectoryPath(location: SettingSource): string {
119 const canonicalDir = getCanonicalAgentDirectoryPath(location)

Callers 1

getAgentDirectoryPathFunction · 0.85

Calls 1

getCwdFunction · 0.85

Tested by

no test coverage detected