mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
fix(copilot): fall back to default approval when all step descriptions are empty
If the user cleared all step descriptions without deleting the steps, buildMessage() produced "Approved with modifications. Please build the agent following these steps: " — a dangling colon with no actual steps. Now falls back to the standard "Approved. Please build the agent." when filledSteps is empty after filtering. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -133,10 +133,12 @@ export function DecomposeGoalTool({
|
||||
const filledSteps = editableStepsRef.current.filter((s) =>
|
||||
s.description.trim(),
|
||||
);
|
||||
const list = filledSteps
|
||||
.map((s, i) => `${i + 1}. ${s.description}`)
|
||||
.join("; ");
|
||||
return `Approved with modifications. Please build the agent following these steps: ${list}`;
|
||||
if (filledSteps.length > 0) {
|
||||
const list = filledSteps
|
||||
.map((s, i) => `${i + 1}. ${s.description}`)
|
||||
.join("; ");
|
||||
return `Approved with modifications. Please build the agent following these steps: ${list}`;
|
||||
}
|
||||
}
|
||||
return "Approved. Please build the agent.";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user