Spaces:
Sleeping
Sleeping
Download lib/agent-thinking-log.test.ts from TigerHatKth/CoDEVX: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/spaces/TigerHatKth/CoDEVX/resolve/main/lib/agent-thinking-log.test.ts
- Command line
-
hf download hf://spaces/TigerHatKth/CoDEVX/lib/agent-thinking-log.test.ts
-
curl -L -o agent-thinking-log.test.ts https://huggingface.co/spaces/TigerHatKth/CoDEVX/resolve/main/lib/agent-thinking-log.test.ts
1.17 kB
| 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); | |
| }); | |
| }); | |