mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
19 lines
502 B
TypeScript
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"}.`,
|
|
}
|
|
}
|
|
}
|