mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
Merge main into worktree-confusion: resolve conflicts maintaining both sets of changes
This commit is contained in:
@@ -256,6 +256,13 @@ export interface AutoModeAPI {
|
||||
featureId: string,
|
||||
worktreePath?: string
|
||||
) => Promise<{ success: boolean; error?: string }>;
|
||||
approvePlan: (
|
||||
projectPath: string,
|
||||
featureId: string,
|
||||
approved: boolean,
|
||||
editedPlan?: string,
|
||||
feedback?: string
|
||||
) => Promise<{ success: boolean; error?: string }>;
|
||||
onEvent: (callback: (event: AutoModeEvent) => void) => () => void;
|
||||
}
|
||||
|
||||
@@ -1693,6 +1700,23 @@ function createMockAutoModeAPI(): AutoModeAPI {
|
||||
return { success: true };
|
||||
},
|
||||
|
||||
approvePlan: async (
|
||||
projectPath: string,
|
||||
featureId: string,
|
||||
approved: boolean,
|
||||
editedPlan?: string,
|
||||
feedback?: string
|
||||
) => {
|
||||
console.log("[Mock] Plan approval:", {
|
||||
projectPath,
|
||||
featureId,
|
||||
approved,
|
||||
editedPlan: editedPlan ? "[edited]" : undefined,
|
||||
feedback,
|
||||
});
|
||||
return { success: true };
|
||||
},
|
||||
|
||||
onEvent: (callback: (event: AutoModeEvent) => void) => {
|
||||
mockAutoModeCallbacks.push(callback);
|
||||
return () => {
|
||||
|
||||
@@ -576,6 +576,20 @@ export class HttpApiClient implements ElectronAPI {
|
||||
featureId,
|
||||
worktreePath,
|
||||
}),
|
||||
approvePlan: (
|
||||
projectPath: string,
|
||||
featureId: string,
|
||||
approved: boolean,
|
||||
editedPlan?: string,
|
||||
feedback?: string
|
||||
) =>
|
||||
this.post("/api/auto-mode/approve-plan", {
|
||||
projectPath,
|
||||
featureId,
|
||||
approved,
|
||||
editedPlan,
|
||||
feedback,
|
||||
}),
|
||||
onEvent: (callback: (event: AutoModeEvent) => void) => {
|
||||
return this.subscribeToEvent(
|
||||
"auto-mode:event",
|
||||
|
||||
Reference in New Issue
Block a user