Files
pi-provider-qoder/scripts/live-fixture-recorder.ts
T
2026-08-31 16:33:47 +00:00

10 lines
488 B
TypeScript

export type RecorderStage = "patExchange" | "userinfo" | "modelList" | "chat";
export function classify(url: string): RecorderStage {
if (url.includes("/jobToken/exchange")) return "patExchange";
if (url.includes("/userinfo")) return "userinfo";
if (url.includes("/model/list")) return "modelList";
if (url.includes("/chat") || url.includes("/agent_chat_generation")) return "chat";
throw new Error(`[live] refusing to record unexpected endpoint: ${new URL(url).pathname}`);
}