fix(webui): align thinking and tool trace affordances
Tool trace groups are supporting details, so default them to collapsed. Match the Thinking bubble's expanded body to the tool trace affordance by using the same grouped header and animated fade/slide body treatment. Update MessageBubble tests to assert tool traces start collapsed and expand on click. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -72,11 +72,12 @@ describe("MessageBubble", () => {
|
||||
render(<MessageBubble message={message} />);
|
||||
const toggle = screen.getByRole("button", { name: /used 2 tools/i });
|
||||
|
||||
expect(screen.getByText('weather("get")')).toBeInTheDocument();
|
||||
expect(screen.getByText('search "hk weather"')).toBeInTheDocument();
|
||||
expect(screen.queryByText('weather("get")')).not.toBeInTheDocument();
|
||||
expect(screen.queryByText('search "hk weather"')).not.toBeInTheDocument();
|
||||
|
||||
fireEvent.click(toggle);
|
||||
expect(screen.queryByText('weather("get")')).not.toBeInTheDocument();
|
||||
expect(screen.getByText('weather("get")')).toBeInTheDocument();
|
||||
expect(screen.getByText('search "hk weather"')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders video media as an inline player", () => {
|
||||
|
||||
Reference in New Issue
Block a user