fix(frontend): run pnpm format on DecomposeGoal test files

Agent-Logs-Url: https://github.com/Significant-Gravitas/AutoGPT/sessions/40326921-8824-4f62-bb6b-9f7dc5f89657

Co-authored-by: ntindle <8845353+ntindle@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-15 20:16:28 +00:00
committed by GitHub
parent c01c47d53c
commit 559438fd64
2 changed files with 20 additions and 19 deletions

View File

@@ -181,9 +181,7 @@ describe("buildRenderSegments", () => {
});
it("does not collapse a single generic tool part", () => {
const parts = [
toolPart("generic_a", "output-available"),
];
const parts = [toolPart("generic_a", "output-available")];
const segments = buildRenderSegments(parts);
expect(segments).toHaveLength(1);
expect(segments[0].kind).toBe("part");
@@ -233,11 +231,9 @@ describe("splitReasoningAndResponse", () => {
});
it("pins interactive tool parts to response section", () => {
const interactiveTool = toolPart(
"decompose_goal",
"output-available",
{ type: "task_decomposition" },
);
const interactiveTool = toolPart("decompose_goal", "output-available", {
type: "task_decomposition",
});
const parts = [
textPart("Thinking..."),
interactiveTool,

View File

@@ -60,7 +60,14 @@ const DECOMPOSITION: TaskDecompositionOutput = {
function makePart(
state: string,
output?: unknown,
): { type: string; toolCallId: string; toolName: string; state: string; input?: unknown; output?: unknown } {
): {
type: string;
toolCallId: string;
toolName: string;
state: string;
input?: unknown;
output?: unknown;
} {
return {
type: "tool-decompose_goal",
toolCallId: "call_1",
@@ -93,9 +100,7 @@ describe("DecomposeGoalTool", () => {
isLastMessage
/>,
);
expect(
screen.getByText(/Failed to analyze the goal/i),
).toBeDefined();
expect(screen.getByText(/Failed to analyze the goal/i)).toBeDefined();
expect(screen.getByText("Try again")).toBeDefined();
});
@@ -124,9 +129,7 @@ describe("DecomposeGoalTool", () => {
isLastMessage
/>,
);
expect(
screen.getByText("Please provide at least one step."),
).toBeDefined();
expect(screen.getByText("Please provide at least one step.")).toBeDefined();
});
it("renders the build plan accordion with steps", () => {
@@ -173,9 +176,7 @@ describe("DecomposeGoalTool", () => {
/>,
);
expect(screen.queryByText("Modify")).toBeNull();
expect(
screen.getByText(/Review the plan above and approve/),
).toBeDefined();
expect(screen.getByText(/Review the plan above and approve/)).toBeDefined();
});
it("hides action buttons when requires_approval is false", () => {
@@ -294,7 +295,11 @@ describe("DecomposeGoalTool", () => {
});
expect(
(screen.getAllByPlaceholderText("Step description")[0] as HTMLTextAreaElement).value,
(
screen.getAllByPlaceholderText(
"Step description",
)[0] as HTMLTextAreaElement
).value,
).toBe("Fetch RSS feed");
});