Spaces:
Sleeping
Sleeping
Download lib/agent-thinking-log.ts from TigerHatKth/CoDEVX: direct link, hf CLI and curl.
- Browser
- Download file 666 Bytes
-
https://huggingface.co/spaces/TigerHatKth/CoDEVX/resolve/main/lib/agent-thinking-log.ts
- Command line
-
hf download hf://spaces/TigerHatKth/CoDEVX/lib/agent-thinking-log.ts
-
curl -L -o agent-thinking-log.ts https://huggingface.co/spaces/TigerHatKth/CoDEVX/resolve/main/lib/agent-thinking-log.ts
666 Bytes
| import type { AgentLogEntry } from "./work-package-types"; | |
| function classifyThinkingLine(line: string): AgentLogEntry["title"] { | |
| if (line.startsWith("Resolved scope")) return "Scope resolved"; | |
| if (line.startsWith("Mode:")) return "Mutation policy"; | |
| if (line.startsWith("Using ")) return "Provider selected"; | |
| return "Thinking"; | |
| } | |
| export function buildThinkingLogEntries(args: { | |
| thinkingSummary?: string[]; | |
| }) { | |
| const { thinkingSummary = [] } = args; | |
| return thinkingSummary | |
| .map((line) => line.trim()) | |
| .filter(Boolean) | |
| .map((line) => ({ | |
| title: classifyThinkingLine(line), | |
| detail: line, | |
| level: "info" as const, | |
| })); | |
| } | |