MCPcopy Create free account
hub / github.com/T-Lab-CUHKSZ/claude-code / eagerLoadSettings

Function eagerLoadSettings

src/main.tsx:515–529  ·  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

513 * This ensures settings are filtered from the start of initialization
514 */
515function eagerLoadSettings(): void {
516 profileCheckpoint('eagerLoadSettings_start');
517 // Parse --settings flag early to ensure settings are loaded before init()
518 const settingsFile = eagerParseCliFlag('--settings');
519 if (settingsFile) {
520 loadSettingsFromFlag(settingsFile);
521 }
522
523 // Parse --setting-sources flag early to control which sources are loaded
524 const settingSourcesArg = eagerParseCliFlag('--setting-sources');
525 if (settingSourcesArg !== undefined) {
526 loadSettingSourcesFromFlag(settingSourcesArg);
527 }
528 profileCheckpoint('eagerLoadSettings_end');
529}
530function initializeEntrypoint(isNonInteractive: boolean): void {
531 // Skip if already set (e.g., by SDK or other entrypoints)
532 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