Update features and dependencies
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { db, users, eq } from "@epicure/db";
|
||||
|
||||
export async function getUserPrivateBio(userId: string): Promise<string | null> {
|
||||
const row = await db.query.users.findFirst({
|
||||
where: eq(users.id, userId),
|
||||
columns: { privateBio: true },
|
||||
});
|
||||
return row?.privateBio ?? null;
|
||||
}
|
||||
|
||||
export function buildUserBioContext(privateBio: string | null): string {
|
||||
if (!privateBio?.trim()) return "";
|
||||
return `\n\nUser preferences and context:\n${privateBio.trim()}`;
|
||||
}
|
||||
Reference in New Issue
Block a user