diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/__tests__/helpers.test.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/__tests__/helpers.test.ts index ebae176525..77b2529f4d 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/__tests__/helpers.test.ts +++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/__tests__/helpers.test.ts @@ -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, diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/tools/DecomposeGoal/__tests__/DecomposeGoal.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/tools/DecomposeGoal/__tests__/DecomposeGoal.test.tsx index 2661df66d7..e0fbd852d0 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot/tools/DecomposeGoal/__tests__/DecomposeGoal.test.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot/tools/DecomposeGoal/__tests__/DecomposeGoal.test.tsx @@ -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"); });