Files
t3code/apps/server/src/provider/cursorSdkModel.ts
T
Julius Marminge d7abcb569f Add Cursor SDK orchestration replay support
- Wire Cursor adapter and provider session handling into orchestration v2
- Add replay fixtures, recording script, and coverage for Cursor turn flows
- Update docs and debug timeline mapping for Cursor events
2026-08-14 11:22:51 +02:00

34 lines
887 B
TypeScript

const CURSOR_SDK_PARAMETER_TO_PROVIDER_OPTION: Readonly<Record<string, string>> = {
context: "contextWindow",
fast: "fastMode",
};
const PROVIDER_OPTION_TO_CURSOR_SDK_PARAMETER: Readonly<Record<string, string>> = {
contextWindow: "context",
fastMode: "fast",
};
export function cursorSdkProviderOptionId(parameterId: string): string {
return CURSOR_SDK_PARAMETER_TO_PROVIDER_OPTION[parameterId] ?? parameterId;
}
export function cursorSdkParameterId(providerOptionId: string): string {
return PROVIDER_OPTION_TO_CURSOR_SDK_PARAMETER[providerOptionId] ?? providerOptionId;
}
export function cursorSdkParameterPriority(parameterId: string): number {
switch (parameterId) {
case "effort":
case "reasoning":
return 0;
case "context":
return 1;
case "fast":
return 2;
case "thinking":
return 3;
default:
return 4;
}
}