Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

tool-first-text.spec.ts

17 lines600 Bytes

1import { expect, test } from '@playwright/test'
2​
3/**
4 * `StreamProcessor` must not drop the first `TEXT_MESSAGE_CONTENT` delta when
5 * a tool call's `parentMessageId` precedes that message's real
6 * `TEXT_MESSAGE_START` — the normal AG-UI shape for "call a tool, then
7 * explain the result" as one assistant turn.
8 */
9test.describe('tool-first text (#1247)', () => {
10 test('does not drop the first text delta after a tool-first message', async ({
11 page,
12 }) => {
13 await page.goto('/tool-first-text')
14​
15 await expect(page.getByTestId('assistant-text')).toHaveText('Hello, world.')
16 })
17})