mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-25 02:32:47 +00:00
* fix(plugin): continue one timeline item across ACP chunks without messageId The plugin ACP reducer minted a new fallback id for every agent_message_chunk / agent_thought_chunk that carried no messageId, so a streamed reply rendered as one block per chunk, splitting words and Markdown delimiters (#4699). Keep one fallback id per chunk kind and end it on a chunk of the other kind, a tool call, a plan, a user message, or a turn boundary, matching the server-side ACP provider. * fix(plugin): end the other chunk kind's item on any chunk A chunk of one kind now ends the other kind's fallback item before the content or id is looked at, so an explicit-id text chunk between two id-less thoughts yields three items instead of merging the thoughts. The test declares the streamed updates through the connector harness instead of handling protocol frames itself. * test(plugin): verify ACP message boundaries and rendered Markdown * test(app): synchronize rewind setup and menu selection --------- Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import { test } from "../support/fixtures";
|
|
import {
|
|
withAcpStreamingMarkdown,
|
|
requestAcpMarkdown,
|
|
expectAcpMarkdown,
|
|
reloadAcpMarkdown,
|
|
} from "../support/helpers/acp-streaming-markdown";
|
|
import {
|
|
expectFinishedMarkdown,
|
|
expectReloadedMarkdown,
|
|
expectUnfinishedBold,
|
|
expectUnfinishedLink,
|
|
requestStreamingMarkdown,
|
|
withStreamingMarkdown,
|
|
} from "../support/helpers/streaming-markdown";
|
|
|
|
test("formats unfinished Markdown while streaming and preserves the completed rendering", async ({
|
|
page,
|
|
}, testInfo) => {
|
|
await withStreamingMarkdown(page, testInfo, async (agent) => {
|
|
await requestStreamingMarkdown(agent);
|
|
await expectUnfinishedBold(page);
|
|
await expectUnfinishedLink(page, agent, testInfo);
|
|
await expectFinishedMarkdown(page, agent, testInfo);
|
|
await expectReloadedMarkdown(page);
|
|
});
|
|
});
|
|
|
|
for (const width of [1100, 390]) {
|
|
test(`ACP plugin chunks preserve Markdown and separate turns at ${width}px`, async ({
|
|
page,
|
|
}, testInfo) => {
|
|
await page.setViewportSize({ width, height: 844 });
|
|
await withAcpStreamingMarkdown(page, async (agent) => {
|
|
await requestAcpMarkdown(agent);
|
|
await expectAcpMarkdown(page, 1);
|
|
await requestAcpMarkdown(agent);
|
|
await expectAcpMarkdown(page, 2);
|
|
await reloadAcpMarkdown(page, testInfo);
|
|
});
|
|
});
|
|
}
|