Roo-Code/apps/web-evals/src/lib/actions.ts
2025-06-11 14:17:53 -07:00

19 lines
502 B
TypeScript

"use server"
import { client, getProductionClient, copyRun } from "@roo-code/evals"
export async function copyRunToProduction(runId: number) {
try {
await copyRun({ sourceDb: client, targetDb: getProductionClient(), runId })
return {
success: true,
message: `Run ${runId} successfully copied to production.`,
}
} catch (error) {
return {
success: false,
error: `Failed to copy run ${runId} to production: ${error instanceof Error ? error.message : "Unknown error"}.`,
}
}
}