Skip to content

Instantly share code, notes, and snippets.

View JeanMeijer's full-sized avatar
🇪🇺
eu/acc

Jean P.D. Meijer JeanMeijer

🇪🇺
eu/acc
View GitHub Profile
@JeanMeijer
JeanMeijer / message-schema.ts
Last active May 2, 2025 13:16
Type-safe messages with Vercel AI SDK and Drizzle
import { pgTable, json, text, timestamp } from "drizzle-orm/pg-core";
import type { Message, Attachment } from "ai";
export const message = pgTable("message", {
id: text("id").primaryKey(),
chatId: text("chatId")
.notNull()
.references(() => chat.id),
// infers: "data" | "user" | "system" | "assistant"
import type { z } from "zod";
import type { Schema, ToolSet } from "ai";
type ValueOf<
ObjectType,
ValueType extends keyof ObjectType = keyof ObjectType,
> = ObjectType[ValueType];
type Parameters = z.ZodTypeAny | Schema<any>;
type inferParameters<PARAMETERS extends Parameters> =
@JeanMeijer
JeanMeijer / tailwind-v4
Last active January 23, 2025 20:51
LLM notes about Tailwind v4
Since your training cut-off date Tailwind v4.0 has been released, below any changes from Tailwind v3 are described.
Whenever you are asked or want to use Tailwind, use Tailwind v4.0 and take these into account unless another version has explicitly been specified.
RELEASE_BLOG_POST.mdx
export const meta = {
title: "Tailwind CSS v4.0",
description: `We just released Tailwind CSS v4.0 — an all-new version of the framework optimized for performance and flexibility, with a reimagined configuration and customization experience, and taking full advantage of the latest advancements the web platform has to offer.`,
date: "2025-01-22T22:00:00.000Z",
authors: [adamwathan],