mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-23 01:32:40 +00:00
Send every original tool call and each whole accumulated assistant message through plugin transformers before display grouping or Markdown splitting. Preserve streaming callbacks, original payloads, native Markdown block identities, and chat outline reading position. Reject legacy fragment caches and retain failing-first plugin-interface and browser regressions. Fixes #4673. Fixes #4789. Consolidates #4820. Co-authored-by: Matt Cowger <matt@cowger.us> Co-authored-by: Jegor Kitskerkin <jegor.kitskerkin@gmail.com> Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import { test } from "../support/fixtures";
|
|
import {
|
|
withTimelinePlugin,
|
|
requestPluginTimeline,
|
|
interactWithStreamingCard,
|
|
expectWholeCompletedCard,
|
|
expectBothConsecutiveTools,
|
|
} from "../support/helpers/plugin-timeline";
|
|
|
|
for (const width of [1100, 390]) {
|
|
test(`assistant plugin receives the whole streaming message at width ${width}`, async ({
|
|
page,
|
|
}, info) => {
|
|
await page.setViewportSize({ width, height: 900 });
|
|
await withTimelinePlugin(page, info, "assistant", async (agent) => {
|
|
await requestPluginTimeline(agent);
|
|
await interactWithStreamingCard(page);
|
|
await agent.client.waitForFinish(agent.agentId, 30_000);
|
|
await expectWholeCompletedCard(page);
|
|
// Local state is checked during growth; the viewport remounts on the history handoff.
|
|
await page.reload({ waitUntil: "domcontentloaded" });
|
|
await expectWholeCompletedCard(page);
|
|
});
|
|
});
|
|
}
|
|
|
|
test("Overview preserves both consecutive tool plugin cards", async ({ page }, info) => {
|
|
await withTimelinePlugin(page, info, "tools", async (agent) => {
|
|
await requestPluginTimeline(agent);
|
|
await agent.client.waitForFinish(agent.agentId, 30_000);
|
|
await expectBothConsecutiveTools(page);
|
|
await page.reload({ waitUntil: "domcontentloaded" });
|
|
await expectBothConsecutiveTools(page);
|
|
});
|
|
});
|