Spaces:
Running
Running
File size: 1,173 Bytes
837e3ac | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | import { describe, expect, it } from "vitest";
import { buildThinkingLogEntries } from "./agent-thinking-log";
describe("buildThinkingLogEntries", () => {
it("maps thinking summary lines into ordered plain-text agent log entries", () => {
const entries = buildThinkingLogEntries({
thinkingSummary: [
"Resolved scope to System Requirements Specification.",
"Mode: ask. Board changes are disabled for this request.",
"Using live model gpt-test.",
"Provider returned non-JSON output; preserving assistant text and skipping board mutation.",
],
});
expect(entries.map((entry) => entry.title)).toEqual([
"Scope resolved",
"Mutation policy",
"Provider selected",
"Thinking",
]);
expect(entries.map((entry) => entry.detail)).toEqual([
"Resolved scope to System Requirements Specification.",
"Mode: ask. Board changes are disabled for this request.",
"Using live model gpt-test.",
"Provider returned non-JSON output; preserving assistant text and skipping board mutation.",
]);
expect(entries.every((entry) => entry.level === "info")).toBe(true);
});
});
|