mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 20:23:36 +00:00
Merge branch 'main' into feat/extend-models-support
This commit is contained in:
@@ -148,11 +148,11 @@ export function useAutoMode() {
|
||||
throw new Error("Auto mode API not available");
|
||||
}
|
||||
|
||||
const result = await api.autoMode.start(currentProject.path);
|
||||
const result = await api.autoMode.start(currentProject.path, maxConcurrency);
|
||||
|
||||
if (result.success) {
|
||||
setAutoModeRunning(true);
|
||||
console.log("[AutoMode] Started successfully");
|
||||
console.log(`[AutoMode] Started successfully with maxConcurrency: ${maxConcurrency}`);
|
||||
} else {
|
||||
console.error("[AutoMode] Failed to start:", result.error);
|
||||
throw new Error(result.error || "Failed to start auto mode");
|
||||
@@ -162,7 +162,7 @@ export function useAutoMode() {
|
||||
setAutoModeRunning(false);
|
||||
throw error;
|
||||
}
|
||||
}, [currentProject, setAutoModeRunning]);
|
||||
}, [currentProject, setAutoModeRunning, maxConcurrency]);
|
||||
|
||||
// Stop auto mode
|
||||
const stop = useCallback(async () => {
|
||||
|
||||
@@ -62,7 +62,7 @@ export function useElectronAgent({
|
||||
imageCount: images?.length || 0
|
||||
});
|
||||
|
||||
// Save images to temp files and get paths
|
||||
// Save images to .automaker/images and get paths
|
||||
let imagePaths: string[] | undefined;
|
||||
if (images && images.length > 0) {
|
||||
imagePaths = [];
|
||||
@@ -70,11 +70,12 @@ export function useElectronAgent({
|
||||
const result = await window.electronAPI.saveImageToTemp(
|
||||
image.data,
|
||||
image.filename,
|
||||
image.mimeType
|
||||
image.mimeType,
|
||||
workingDirectory // Pass workingDirectory as projectPath
|
||||
);
|
||||
if (result.success && result.path) {
|
||||
imagePaths.push(result.path);
|
||||
console.log("[useElectronAgent] Saved image to temp:", result.path);
|
||||
console.log("[useElectronAgent] Saved image to .automaker/images:", result.path);
|
||||
} else {
|
||||
console.error("[useElectronAgent] Failed to save image:", result.error);
|
||||
}
|
||||
@@ -304,7 +305,7 @@ export function useElectronAgent({
|
||||
imageCount: images?.length || 0
|
||||
});
|
||||
|
||||
// Save images to temp files and get paths
|
||||
// Save images to .automaker/images and get paths
|
||||
let imagePaths: string[] | undefined;
|
||||
if (images && images.length > 0) {
|
||||
imagePaths = [];
|
||||
@@ -312,11 +313,12 @@ export function useElectronAgent({
|
||||
const result = await window.electronAPI.saveImageToTemp(
|
||||
image.data,
|
||||
image.filename,
|
||||
image.mimeType
|
||||
image.mimeType,
|
||||
workingDirectory // Pass workingDirectory as projectPath
|
||||
);
|
||||
if (result.success && result.path) {
|
||||
imagePaths.push(result.path);
|
||||
console.log("[useElectronAgent] Saved image to temp:", result.path);
|
||||
console.log("[useElectronAgent] Saved image to .automaker/images:", result.path);
|
||||
} else {
|
||||
console.error("[useElectronAgent] Failed to save image:", result.error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user