import { listTemplates } from "@autoscholar/core"; import Link from "next/link"; import { CodeBlock } from "@/components/CodeBlock"; import { MarkdownView } from "@/components/MarkdownView"; import { modeLabel } from "@/lib/format"; import { db } from "@/lib/server/db"; export const dynamic = "force-dynamic"; export default async function TemplatesPage({ searchParams }: { searchParams: Promise<{ t?: string }> }) { const { t } = await searchParams; const templates = await listTemplates(db()); const cur = templates.find((x) => x.slug === t) ?? templates[0]; return (

Starters

Research instruction templates

Discipline presets synced from research/templates. Preview, then prefill the launch form and edit before freezing.

{templates.length === 0 ? (
No templates synced yet (the scheduler syncs research/templates at start).
) : (
{cur && (

{cur.name}

Use this template

{cur.description}

Preview
Raw
)}
)}
); }