mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
Merge main into feat/extend-models-support
Resolved conflicts: - feature_list.json: Merged all features from both branches - feature-loader.js: Included both model/thinkingLevel and error fields - board-view.tsx: Merged model/thinkingLevel and error fields, kept currentProject check - settings-view.tsx: Merged CLI status checks with navigation/scroll code - app-store.ts: Included both model/thinkingLevel and error fields in Feature interface Fixed linting errors in settings-view.tsx
This commit is contained in:
@@ -416,17 +416,35 @@ export function BoardView() {
|
||||
}
|
||||
}, [showAddDialog, defaultSkipTests]);
|
||||
|
||||
|
||||
// Listen for auto mode feature completion and reload features
|
||||
// Listen for auto mode feature completion and errors to reload features
|
||||
useEffect(() => {
|
||||
const api = getElectronAPI();
|
||||
if (!api?.autoMode) return;
|
||||
|
||||
const { removeRunningTask } = useAppStore.getState();
|
||||
|
||||
const unsubscribe = api.autoMode.onEvent((event) => {
|
||||
if (event.type === "auto_mode_feature_complete") {
|
||||
// Reload features when a feature is completed
|
||||
console.log("[Board] Feature completed, reloading features...");
|
||||
loadFeatures();
|
||||
} else if (event.type === "auto_mode_error") {
|
||||
// Reload features when an error occurs (feature moved to waiting_approval)
|
||||
console.log(
|
||||
"[Board] Feature error, reloading features...",
|
||||
event.error
|
||||
);
|
||||
|
||||
// Remove from running tasks so it moves to the correct column
|
||||
if (event.featureId) {
|
||||
removeRunningTask(event.featureId);
|
||||
}
|
||||
|
||||
loadFeatures();
|
||||
// Show error toast
|
||||
toast.error("Agent encountered an error", {
|
||||
description: event.error || "Check the logs for details",
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -478,7 +496,10 @@ export function BoardView() {
|
||||
const checkAllContexts = async () => {
|
||||
// Check context for in_progress, waiting_approval, and verified features
|
||||
const featuresWithPotentialContext = features.filter(
|
||||
(f) => f.status === "in_progress" || f.status === "waiting_approval" || f.status === "verified"
|
||||
(f) =>
|
||||
f.status === "in_progress" ||
|
||||
f.status === "waiting_approval" ||
|
||||
f.status === "verified"
|
||||
);
|
||||
const contextChecks = await Promise.all(
|
||||
featuresWithPotentialContext.map(async (f) => ({
|
||||
@@ -520,6 +541,7 @@ export function BoardView() {
|
||||
summary: f.summary,
|
||||
model: f.model,
|
||||
thinkingLevel: f.thinkingLevel,
|
||||
error: f.error,
|
||||
}));
|
||||
await api.writeFile(
|
||||
`${currentProject.path}/.automaker/feature_list.json`,
|
||||
@@ -754,7 +776,9 @@ export function BoardView() {
|
||||
console.log(`[Board] Deleted agent context for feature ${featureId}`);
|
||||
} catch (error) {
|
||||
// Context file might not exist, which is fine
|
||||
console.log(`[Board] Context file not found or already deleted for feature ${featureId}`);
|
||||
console.log(
|
||||
`[Board] Context file not found or already deleted for feature ${featureId}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -767,11 +791,17 @@ export function BoardView() {
|
||||
await api.deleteFile(imagePathObj.path);
|
||||
console.log(`[Board] Deleted image: ${imagePathObj.path}`);
|
||||
} catch (error) {
|
||||
console.error(`[Board] Failed to delete image ${imagePathObj.path}:`, error);
|
||||
console.error(
|
||||
`[Board] Failed to delete image ${imagePathObj.path}:`,
|
||||
error
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`[Board] Error deleting images for feature ${featureId}:`, error);
|
||||
console.error(
|
||||
`[Board] Error deleting images for feature ${featureId}:`,
|
||||
error
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2009,10 +2039,15 @@ export function BoardView() {
|
||||
try {
|
||||
const contextPath = `${currentProject.path}/.automaker/agents-context/${feature.id}.md`;
|
||||
await api.deleteFile(contextPath);
|
||||
console.log(`[Board] Deleted agent context for feature ${feature.id}`);
|
||||
console.log(
|
||||
`[Board] Deleted agent context for feature ${feature.id}`
|
||||
);
|
||||
} catch (error) {
|
||||
// Context file might not exist, which is fine
|
||||
console.debug("[Board] No context file to delete for feature:", feature.id);
|
||||
console.debug(
|
||||
"[Board] No context file to delete for feature:",
|
||||
feature.id
|
||||
);
|
||||
}
|
||||
|
||||
// Remove the feature
|
||||
|
||||
Reference in New Issue
Block a user