feat: add template V2 with updated rubrics and fix ActionResult runtime error
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 4m22s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 4m22s
- Add RUBRICS_V2 with improved rubrics for prompts, conception, iteration,
evaluation, alignment and cost_control dimensions
- Add "Full - 15 dimensions (V2)" template using RUBRICS_V2; V1 unchanged
- Set V2 as default template by ordering templates by id desc in getTemplates
- Point demo seed evaluations to full-15-v2
- Remove `export type { ActionResult }` from "use server" files (evaluations,
admin, share) — Turbopack treats all exports as server actions, causing a
runtime ReferenceError when the type is erased at compile time
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,6 @@ import { prisma } from "@/lib/db";
|
||||
import { requireAuth, type ActionResult } from "@/lib/action-helpers";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
export type { ActionResult };
|
||||
|
||||
export async function setUserRole(userId: string, role: "admin" | "evaluator"): Promise<ActionResult> {
|
||||
const session = await requireAuth();
|
||||
|
||||
@@ -5,7 +5,6 @@ import { getEvaluation } from "@/lib/server-data";
|
||||
import { requireAuth, requireEvaluationAccess, type ActionResult } from "@/lib/action-helpers";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
export type { ActionResult };
|
||||
|
||||
export async function fetchEvaluation(id: string): Promise<ActionResult<Awaited<ReturnType<typeof getEvaluation>>>> {
|
||||
const session = await requireAuth();
|
||||
|
||||
@@ -4,7 +4,6 @@ import { prisma } from "@/lib/db";
|
||||
import { requireAuth, requireEvaluationAccess, type ActionResult } from "@/lib/action-helpers";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
export type { ActionResult };
|
||||
|
||||
export async function addShare(evaluationId: string, userId: string): Promise<ActionResult> {
|
||||
const session = await requireAuth();
|
||||
|
||||
@@ -73,6 +73,7 @@ export const getTemplates = cache(async () => {
|
||||
include: {
|
||||
dimensions: { orderBy: { orderIndex: "asc" } },
|
||||
},
|
||||
orderBy: { id: "desc" },
|
||||
});
|
||||
return templates;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user