MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getCurrentProjectConfig

Function getCurrentProjectConfig

source code/utils/config.ts:1604–1625  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1602})
1603
1604export function getCurrentProjectConfig(): ProjectConfig {
1605 if (process.env.NODE_ENV === 'test') {
1606 return TEST_PROJECT_CONFIG_FOR_TESTING
1607 }
1608
1609 const absolutePath = getProjectPathForConfig()
1610 const config = getGlobalConfig()
1611
1612 if (!config.projects) {
1613 return DEFAULT_PROJECT_CONFIG
1614 }
1615
1616 const projectConfig = config.projects[absolutePath] ?? DEFAULT_PROJECT_CONFIG
1617 // Not sure how this became a string
1618 // TODO: Fix upstream
1619 if (typeof projectConfig.allowedTools === 'string') {
1620 projectConfig.allowedTools =
1621 (safeParseJSON(projectConfig.allowedTools) as string[]) ?? []
1622 }
1623
1624 return projectConfig
1625}
1626
1627export function saveCurrentProjectConfig(
1628 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.85

Tested by

no test coverage detected