feat(FN-5585): add planning branch controls to planning mode modal
Adds planning branch controls to the PlanningModeModal, extending the planning API and routes with supporting tests and documentation. The changeset bumps `@runfusion/fusion` as a minor release. Fusion-Task-Id: FN-5585 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> Fusion-Task-Id: FN-5585
This commit is contained in:
@@ -3361,10 +3361,24 @@ export function createTaskFromPlanning(
|
||||
sessionId: string,
|
||||
summary?: PlanningSummary,
|
||||
projectId?: string,
|
||||
options?: {
|
||||
branch?: string;
|
||||
baseBranch?: string;
|
||||
branchSelection?: {
|
||||
mode: "project-default" | "auto-new" | "existing" | "custom-new";
|
||||
branchName?: string;
|
||||
baseBranch?: string;
|
||||
};
|
||||
},
|
||||
): Promise<Task> {
|
||||
return api<Task>(withProjectId("/planning/create-task", projectId), {
|
||||
method: "POST",
|
||||
body: JSON.stringify(summary ? { sessionId, summary } : { sessionId }),
|
||||
body: JSON.stringify({
|
||||
...(summary ? { sessionId, summary } : { sessionId }),
|
||||
...(options?.branch !== undefined ? { branch: options.branch } : {}),
|
||||
...(options?.baseBranch !== undefined ? { baseBranch: options.baseBranch } : {}),
|
||||
...(options?.branchSelection ? { branchSelection: options.branchSelection } : {}),
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user