conversation-material-projection.test.ts 743 B

123456789101112131415161718
  1. import { describe, expect, it } from "vitest";
  2. import { buildUserInputRow } from "../src/zcode-protocol-v4/projection-rows.js";
  3. describe("conversation material projection", () => {
  4. it.each(["", "weather?"])("keeps model-only bot instructions out of visible body %j", (text) => {
  5. const source = { botId: "bot", chatId: "chat", provider: "feishu" as const };
  6. const row = buildUserInputRow(
  7. { rowId: 1, turnId: "turn", createdAt: 1, createdAtSeq: 1 },
  8. {
  9. input: "expanded model material",
  10. intent: { kind: "sendText", text, botGroupSource: source },
  11. },
  12. );
  13. expect(row.text).toBe(text);
  14. expect(row.botGroupSource).toEqual(source);
  15. expect(row.conversationQuotes).toBeUndefined();
  16. });
  17. });