fix: handle both boolean and string types for settings

JSON.parse preserves native types, so boolean true/false stay as
booleans rather than strings. The previous check only handled string
'true', meaning users who set `"ENABLED": true` (boolean) wouldn't
have the feature work.

Now both `getBool()` helper and ResponseProcessor check handle:
- String 'true' → enabled
- Boolean true → enabled
- Any other value → disabled

Tested: Confirmed feature stays disabled with string "false" and
no new CLAUDE.md files are created when accessing directories.
This commit is contained in:
Michel Tomas
2026-02-04 15:14:06 +01:00
committed by Alex Newman
parent bb96092d74
commit b07130acc6
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -124,10 +124,11 @@ export class SettingsDefaultsManager {
/**
* Get a boolean default value
* Handles both string 'true' and boolean true from JSON
*/
static getBool(key: keyof SettingsDefaults): boolean {
const value = this.get(key);
return value === 'true';
return value === 'true' || value === true;
}
/**