mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 21:03:08 +00:00
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:
@@ -15,7 +15,7 @@ import type { SettingsService } from '../services/settings-service.js';
|
||||
*/
|
||||
export async function getAutoLoadClaudeMdSetting(
|
||||
projectPath: string,
|
||||
settingsService?: SettingsService,
|
||||
settingsService?: SettingsService | null,
|
||||
logPrefix = '[SettingsHelper]'
|
||||
): Promise<boolean> {
|
||||
if (!settingsService) {
|
||||
@@ -40,6 +40,6 @@ export async function getAutoLoadClaudeMdSetting(
|
||||
return result;
|
||||
} catch (error) {
|
||||
console.error(`${logPrefix} Failed to load autoLoadClaudeMd setting:`, error);
|
||||
return false;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user