Add prompt improvement button in drawer

This commit is contained in:
Xin Wang
2026-08-26 12:18:18 +08:00
parent 239b9027ca
commit ab409ba9c0
13 changed files with 2067 additions and 39 deletions
+9 -1
View File
@@ -6,7 +6,10 @@
*/
import { loginPathWithReturnTo } from "@/lib/auth-redirect";
import type { BatchRunSnapshot } from "@/data/batch-run";
import type {
BatchRunSnapshot,
PromptImprovementResult,
} from "@/data/batch-run";
import type {
ContextTurn,
FixedInputTurn,
@@ -958,4 +961,9 @@ export const batchRunsApi = {
request<BatchRunSnapshot>(`/api/test-runs/${id}/cancel`, {
method: "POST",
}),
improvePrompt: (id: string) =>
request<PromptImprovementResult>(
`/api/test-runs/${id}/prompt-improvement`,
{ method: "POST" },
),
};