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

Function getCurrentProjectConfig

src/utils/config.ts:1670–1691  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1668})
1669
1670export function getCurrentProjectConfig(): ProjectConfig {
1671 if (process.env.NODE_ENV === 'test') {
1672 return TEST_PROJECT_CONFIG_FOR_TESTING
1673 }
1674
1675 const absolutePath = getProjectPathForConfig()
1676 const config = getGlobalConfig()
1677
1678 if (!config.projects) {
1679 return DEFAULT_PROJECT_CONFIG
1680 }
1681
1682 const projectConfig = config.projects[absolutePath] ?? DEFAULT_PROJECT_CONFIG
1683 // Not sure how this became a string
1684 // TODO: Fix upstream
1685 if (typeof projectConfig.allowedTools === 'string') {
1686 projectConfig.allowedTools =
1687 (safeParseJSON(projectConfig.allowedTools) as string[]) ?? []
1688 }
1689
1690 return projectConfig
1691}
1692
1693export function saveCurrentProjectConfig(
1694 updater: (currentConfig: ProjectConfig) => ProjectConfig,

Callers 15

getStoredSessionCostsFunction · 0.85
setupFunction · 0.85
ConfigFunction · 0.85
claudemd.tsFile · 0.85
exampleCommands.tsFile · 0.85
getReadOnlyToolNamesFunction · 0.85
bridgeMainFunction · 0.85
mcpRemoveHandlerFunction · 0.85
addMcpConfigFunction · 0.85

Calls 1

getGlobalConfigFunction · 0.70

Tested by

no test coverage detected