feat(auto-mode): enhance error handling and feature status updates

- Improved error handling in AutoModeService to log errors and update feature status to "waiting_approval" when an error occurs during feature execution.
- Added error message writing to the context file for better debugging.
- Updated FeatureLoader to include an optional error message parameter when updating feature status.
- Enhanced prompt generation to include detailed context about attached images for better user guidance during feature implementation.
- Modified KanbanCard component to visually indicate features with errors, improving user awareness of issues.

These changes significantly enhance the robustness of the auto mode feature and improve the user experience by providing clearer feedback on feature execution status.
This commit is contained in:
Cody Seibert
2025-12-09 22:06:52 -05:00
parent 7b760090e4
commit 39043b8958
12 changed files with 261 additions and 429 deletions

View File

@@ -36,8 +36,9 @@ class FeatureLoader {
* @param {string} status - The new status
* @param {string} projectPath - Path to the project
* @param {string} [summary] - Optional summary of what was done
* @param {string} [error] - Optional error message if feature errored
*/
async updateFeatureStatus(featureId, status, projectPath, summary) {
async updateFeatureStatus(featureId, status, projectPath, summary, error) {
const featuresPath = path.join(
projectPath,
".automaker",
@@ -98,6 +99,14 @@ class FeatureLoader {
feature.summary = summary;
}
// Update the error field (set or clear)
if (error) {
feature.error = error;
} else {
// Clear any previous error when status changes without error
delete feature.error;
}
// Save back to file
const toSave = features.map((f) => {
const featureData = {
@@ -123,6 +132,9 @@ class FeatureLoader {
if (f.summary !== undefined) {
featureData.summary = f.summary;
}
if (f.error !== undefined) {
featureData.error = f.error;
}
return featureData;
});