refactor: streamline auto-load CLAUDE.md setting retrieval

- Removed the private method for getting the autoLoadClaudeMd setting from AgentService and AutoModeService.
- Updated both services to utilize the new settings helper for retrieving the autoLoadClaudeMd setting, improving code reusability and clarity.
- Adjusted error handling in the settings helper to throw errors instead of returning false when the settings service is unavailable.
This commit is contained in:
Kacper
2025-12-24 22:48:02 +01:00
parent 3154121840
commit 99a19cb2a2
4 changed files with 19 additions and 79 deletions

View File

@@ -173,18 +173,6 @@ function buildClaudeMdOptions(config: CreateSdkOptionsConfig): {
result.systemPrompt.append = config.systemPrompt;
}
console.log(
'[SDK Options] CLAUDE.md auto-loading enabled:',
JSON.stringify(
{
systemPrompt: result.systemPrompt,
settingSources: result.settingSources,
},
null,
2
)
);
return result;
}