Files
tg-chat-bot/test/response-model-output.test.mjs
2026-05-18 18:59:09 +03:00

22 lines
703 B
JavaScript

import test from "node:test";
import assert from "node:assert/strict";
const {summarizeModelOutput} = await import("../dist/ai/response-model-output.js");
test("model output summary trims text and copies attachment records", () => {
const toolExecutions = [{toolName: "read_file", callId: "1", argumentsText: "{}", resultChars: 10}];
const outputAttachments = [{artifactKind: "generated_file", fileName: "out.txt", sizeBytes: 12}];
const summary = summarizeModelOutput({
text: " hello world ",
toolExecutions,
outputAttachments,
});
assert.deepEqual(summary, {
text: "hello world",
toolExecutions,
outputAttachments,
});
});