fix: ensure config.yaml exists and is populated when accessed#11915
fix: ensure config.yaml exists and is populated when accessed#11915
Conversation
- Opening a config profile (gear icon) now creates config.yaml with defaults if the file is missing, matching startup behavior - Empty config.yaml files are detected and populated with default config instead of causing parse errors
Docs ReviewNo documentation updates needed for this PR. Reason: This is a bug fix that improves the robustness of existing documented behavior. The docs already state that Continue "generates a The implementation details of when and how the default config is created are internal concerns that don't need to be documented. |
Test Coverage ReviewThis PR introduces bug fixes to Suggested Test Cases for
|
Summary
config.yamlwith defaults if the file is missing, matching the behavior on startupconfig.yamlis detected and populated with the default config instead of causing a parse errorTest plan
~/.continue/config.yaml, click the gear icon in the GUI — file should be created with defaults and opened~/.continue/config.yaml, reload — should be populated with default configSummary by cubic
Create and populate
config.yamlwith defaults when opening the config profile and when the file exists but is empty. This prevents parse errors and aligns behavior with startup.getConfigYamlPath()now writes defaults ifconfig.yamlis missing or empty, with a simplified existence check for readability.getConfigYamlPath()first to ensure the file exists with defaults.Written for commit 2008894. Summary will update on new commits.