mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-21 08:42:39 +00:00
* feat(plugins): expose agent and workspace lifecycle hooks * test(plugins): verify lifecycle examples with version requirements * fix(plugins): publish archive hooks for closed agents * test(plugins): remove diagnostic catch from lifecycle test * refactor(plugins): define hook handlers in lifecycle module
21 lines
841 B
TypeScript
21 lines
841 B
TypeScript
import { expect, test } from "vitest";
|
|
import { latestOutputText } from "./inspect";
|
|
|
|
test("matches provider text split across timeline chunks without matching old turns or user prompts", () => {
|
|
const output = latestOutputText([
|
|
{ type: "user_message", text: "An older request" },
|
|
{ type: "assistant_message", text: "old out of credits" },
|
|
{ type: "user_message", text: "The user mentions out of credits" },
|
|
{ type: "assistant_message", text: "out", messageId: "reply" },
|
|
{ type: "assistant_message", text: " of credits", messageId: "reply" },
|
|
]);
|
|
expect(output).toBe("out of credits");
|
|
expect(
|
|
latestOutputText([
|
|
{ type: "assistant_message", text: "out of credits" },
|
|
{ type: "user_message", text: "Try again." },
|
|
{ type: "assistant_message", text: "Done" },
|
|
]),
|
|
).toBe("Done");
|
|
});
|