feat(omo-codex): batch 102 (19 files)

This commit is contained in:
YeonGyu-Kim
2026-05-30 19:12:20 +09:00
parent 10e8671b5e
commit 20b0784811
19 changed files with 1596 additions and 0 deletions
@@ -0,0 +1,26 @@
import { readFileSync } from "node:fs";
const CONTEXT_PRESSURE_MARKERS = [
"context compacted",
"context_length_exceeded",
"skill descriptions were shortened",
"context_too_large",
"codex ran out of room in the model's context window",
"your input exceeds the context window",
"long threads and multiple compactions",
] as const;
export function hasContextPressureMarker(text: string): boolean {
const normalizedText = text.toLowerCase();
return CONTEXT_PRESSURE_MARKERS.some((marker) => normalizedText.includes(marker));
}
export function transcriptHasContextPressureMarker(transcriptPath: string | null | undefined): boolean {
if (transcriptPath === undefined || transcriptPath === null) return false;
try {
return hasContextPressureMarker(readFileSync(transcriptPath, "utf8"));
} catch (error) {
if (error instanceof Error) return false;
throw error;
}
}