This commit is contained in:
2026-04-18 13:05:29 +08:00
parent 09d4c0c31b
commit 5032701c38
77 changed files with 8538 additions and 2413 deletions

View File

@@ -63,3 +63,31 @@ test('filters empty recommended replies and avoids duplicate key warnings', () =
expect(duplicateKeyCalls).toHaveLength(0);
});
test('renders a streaming assistant bubble without timestamps', () => {
if (!Element.prototype.scrollIntoView) {
Element.prototype.scrollIntoView = () => {};
}
render(
<CustomWorldAgentThread
messages={[
{
id: 'message-1',
role: 'user',
kind: 'chat',
text: '我想做一个潮湿压抑的海上世界。',
createdAt: '2026-04-16T10:01:00.000Z',
relatedOperationId: null,
},
]}
streamingReplyText="那我先顺着这个方向收一下,开场时你更想让玩家撞上什么麻烦"
isStreamingReply
/>,
);
expect(
screen.getByText(//u),
).toBeTruthy();
expect(screen.queryByText('10:01')).toBeNull();
});