fix(site): align streaming thinking spacing (#25291)

This commit is contained in:
Danielle Maywood
2026-05-13 17:05:34 +01:00
committed by GitHub
parent b9b8d763e3
commit 7fe4d97fd0
2 changed files with 14 additions and 3 deletions
@@ -268,13 +268,24 @@ export const ThinkingDuringStreamingWithToolCalls: Story = {
tool_call_id: "tc-1",
args: { command: "ls -la" },
},
{
type: "tool-call",
tool_name: "read_file",
tool_call_id: "tc-2",
args: { path: "README.md" },
},
]),
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
// "Thinking" should still be visible during streaming
// when only tool-call blocks have arrived.
// Tool-only stream chunks can otherwise clear the activity indicator before text arrives.
const matches = canvas.getAllByText("Thinking");
expect(matches.length).toBeGreaterThanOrEqual(1);
const thinkingBlock = matches[0].parentElement;
expect(thinkingBlock).toBeInstanceOf(HTMLElement);
expect(getComputedStyle(thinkingBlock as HTMLElement).marginTop).toBe(
"8px",
);
},
};
@@ -92,7 +92,7 @@ export const StreamingOutput: FC<{
<ConversationItem {...conversationItemProps}>
<Message className="w-full">
<MessageContent className="whitespace-normal">
<div className="space-y-3">
<div className="space-y-2">
{shouldShowBlocks && (
<BlockList
blocks={blocks}