fix: resolve 8 bugs affecting real users

- Fix KeyError 'root' in FileGrouper when merging groups with no root-level files
- Fix changelog commit parsing breaking on multiline bodies (use %x00 separator)
- Add empty choices/content checks in OpenAI, Anthropic, OpenRouter providers
- Fix config edit crash when config is empty
- Fix validate command using wrong color for 'no staged files'
- Add type check for corrupted YAML config (non-dict returns empty dict)
This commit is contained in:
sankalp committed 2026-06-16 14:36:19 +05:45
1 parent a56fe0a6ee
commit ede489c219
8 files changed
+29 -10

No files matched your search

+7 -1
View File
@@ -246,7 +246,13 @@ def load_config() -> Dict[str, Any]:
try:
with config_path.open("r", encoding="utf-8") as f:
return yaml.safe_load(f) or {}
data = yaml.safe_load(f)
if not isinstance(data, dict):
print(
f"Warning: Config at {config_path} is not a dict, using defaults."
)
return {}
return data
except Exception as e:
print(f"Warning: Failed to load config from {config_path}: {e}")
return {}