fix: resolve Prettier markdown code block parsing errors

- Fix syntax errors in skills markdown files (.github/skills, .opencode/skills)
- Change typescript to tsx for code blocks with JSX
- Replace ellipsis (...) in array examples with valid syntax
- Separate CSS from TypeScript into distinct code blocks
- Convert JavaScript object examples to valid JSON in docs
- Fix enum definitions with proper comma separation
This commit is contained in:
2026-01-20 21:09:29 +01:00
parent 7932fe7386
commit cd05fc8648
177 changed files with 5042 additions and 5541 deletions

View File

@@ -1,20 +1,31 @@
import type { Prisma, SessionCategory } from "@prisma/client";
import { type NextRequest, NextResponse } from "next/server";
import { getServerSession } from "next-auth/next";
import { authOptions } from "../../../../lib/auth";
import { prisma } from "../../../../lib/prisma";
import type { ChatSession } from "../../../../lib/types";
import { neonAuth } from "@/lib/auth/server";
import { prisma } from "@/lib/prisma";
import type { ChatSession } from "@/lib/types";
export const dynamic = "force-dynamic";
// MIGRATED: Removed "export const dynamic = 'force-dynamic'" - dynamic by default with Cache Components
export async function GET(request: NextRequest) {
const authSession = await getServerSession(authOptions);
if (!authSession || !authSession.user?.companyId) {
const { session: authSession, user: authUser } = await neonAuth();
if (!authSession || !authUser?.email) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
const companyId = authSession.user.companyId;
// Look up user in our database to get companyId
const user = await prisma.user.findUnique({
where: { email: authUser.email },
select: { companyId: true },
});
if (!user || !user.companyId) {
return NextResponse.json(
{ error: "User not found or no company" },
{ status: 401 }
);
}
const companyId = user.companyId;
const { searchParams } = new URL(request.url);
const searchTerm = searchParams.get("searchTerm");