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

Function eagerLoadSettings

src/main.tsx:502–516  ·  view source on GitHub ↗

* Parse and load settings flags early, before init() * This ensures settings are filtered from the start of initialization

()

Source from the content-addressed store, hash-verified

500 * This ensures settings are filtered from the start of initialization
501 */
502function eagerLoadSettings(): void {
503 profileCheckpoint('eagerLoadSettings_start');
504 // Parse --settings flag early to ensure settings are loaded before init()
505 const settingsFile = eagerParseCliFlag('--settings');
506 if (settingsFile) {
507 loadSettingsFromFlag(settingsFile);
508 }
509
510 // Parse --setting-sources flag early to control which sources are loaded
511 const settingSourcesArg = eagerParseCliFlag('--setting-sources');
512 if (settingSourcesArg !== undefined) {
513 loadSettingSourcesFromFlag(settingSourcesArg);
514 }
515 profileCheckpoint('eagerLoadSettings_end');
516}
517function initializeEntrypoint(isNonInteractive: boolean): void {
518 // Skip if already set (e.g., by SDK or other entrypoints)
519 if (process.env.CLAUDE_CODE_ENTRYPOINT) {

Callers 1

mainFunction · 0.85

Calls 4

profileCheckpointFunction · 0.85
eagerParseCliFlagFunction · 0.85
loadSettingsFromFlagFunction · 0.85

Tested by

no test coverage detected