Files
paseo/packages/protocol/src/timeline-identity.test.ts
Mohamed Boudra e34aea206e feat(plugins): add live timeline rows and client slash commands
Plugins can transform live timeline source items at render time, append durable plugin rows from daemon handlers, and register client-only slash commands in the composer.

Related to #3940 and #3952.
2026-09-02 13:12:09 +02:00

29 lines
773 B
TypeScript

import { describe, expect, it } from "vitest";
import { timelineItemIdentity } from "./timeline-identity.js";
describe("timelineItemIdentity", () => {
it("uses tool call ids and plugin-scoped ids", () => {
expect(
timelineItemIdentity({
type: "tool_call",
callId: "call-1",
name: "read",
detail: { type: "unknown", input: null, output: null },
status: "running",
error: null,
}),
).toBe("call-1");
expect(
timelineItemIdentity({
type: "plugin",
id: "row-1",
pluginId: "review",
kind: "review",
version: 1,
data: {},
}),
).toBe("review/row-1");
expect(timelineItemIdentity({ type: "reasoning", text: "hi" })).toBeNull();
});
});