feat(automaker): enhance feature management and UI components

- Updated `.gitignore` to include agent context files and user-uploaded images for better organization.
- Added "Uncategorized" category to `categories.json` for improved feature classification.
- Populated `feature_list.json` with new features, including detailed descriptions and image attachments for better context.
- Changed application icon to `icon_gold.png` for a refreshed look.
- Enhanced `AutoModeService` to support max concurrency and periodic checks, improving feature execution management.
- Updated image handling in `DescriptionImageDropZone` to save images in the project directory.
- Improved UI components with better styling and responsiveness, including drag-and-drop functionality for project management.

This update significantly enhances the feature management process and user experience within the application.
This commit is contained in:
Cody Seibert
2025-12-09 21:23:09 -05:00
parent ac5b562f7a
commit 7b760090e4
28 changed files with 1207 additions and 774 deletions

View File

@@ -75,7 +75,57 @@ class FeatureExecutor {
};
// Build the prompt for this specific feature
const prompt = promptBuilder.buildFeaturePrompt(feature);
let prompt = promptBuilder.buildFeaturePrompt(feature);
// Add images to prompt if feature has imagePaths
if (feature.imagePaths && feature.imagePaths.length > 0) {
const contentBlocks = [];
// Add text block
contentBlocks.push({
type: "text",
text: prompt,
});
// Add image blocks
const fs = require("fs");
const path = require("path");
for (const imagePathObj of feature.imagePaths) {
try {
const imagePath = imagePathObj.path;
const imageBuffer = fs.readFileSync(imagePath);
const base64Data = imageBuffer.toString("base64");
const ext = path.extname(imagePath).toLowerCase();
const mimeTypeMap = {
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
".png": "image/png",
".gif": "image/gif",
".webp": "image/webp",
};
const mediaType = mimeTypeMap[ext] || imagePathObj.mimeType || "image/png";
contentBlocks.push({
type: "image",
source: {
type: "base64",
media_type: mediaType,
data: base64Data,
},
});
console.log(`[FeatureExecutor] Added image to prompt: ${imagePath}`);
} catch (error) {
console.error(
`[FeatureExecutor] Failed to load image ${imagePathObj.path}:`,
error
);
}
}
// Use content blocks instead of plain text
prompt = contentBlocks;
}
// Planning: Analyze the codebase and create implementation plan
sendToRenderer({
@@ -274,7 +324,58 @@ class FeatureExecutor {
};
// Build prompt with previous context
const prompt = promptBuilder.buildResumePrompt(feature, previousContext);
let prompt = promptBuilder.buildResumePrompt(feature, previousContext);
// Add images to prompt if feature has imagePaths or followUpImages
const imagePaths = feature.followUpImages || feature.imagePaths;
if (imagePaths && imagePaths.length > 0) {
const contentBlocks = [];
// Add text block
contentBlocks.push({
type: "text",
text: prompt,
});
// Add image blocks
const fs = require("fs");
const path = require("path");
for (const imagePathObj of imagePaths) {
try {
const imagePath = imagePathObj.path;
const imageBuffer = fs.readFileSync(imagePath);
const base64Data = imageBuffer.toString("base64");
const ext = path.extname(imagePath).toLowerCase();
const mimeTypeMap = {
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
".png": "image/png",
".gif": "image/gif",
".webp": "image/webp",
};
const mediaType = mimeTypeMap[ext] || imagePathObj.mimeType || "image/png";
contentBlocks.push({
type: "image",
source: {
type: "base64",
media_type: mediaType,
data: base64Data,
},
});
console.log(`[FeatureExecutor] Added image to resume prompt: ${imagePath}`);
} catch (error) {
console.error(
`[FeatureExecutor] Failed to load image ${imagePathObj.path}:`,
error
);
}
}
// Use content blocks instead of plain text
prompt = contentBlocks;
}
const currentQuery = query({ prompt, options });
execution.query = currentQuery;