streaming, markdown, model selecting, and lots more

This commit is contained in:
Zoe
2026-02-02 23:16:06 -06:00
parent 8c28946703
commit d5a5945c03
114 changed files with 6109 additions and 2938 deletions
+3
View File
@@ -0,0 +1,3 @@
import { createAuthClient } from 'better-auth/vue';
export const authClient = createAuthClient({});
+25 -12
View File
@@ -1,19 +1,32 @@
import { betterAuth } from "better-auth/minimal";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import * as schema from "~~/db/schema";
import { useDrizzle } from "~~/server/utils/drizzle";
import { triplitAdapter } from '@daveyplate/better-auth-triplit';
import { HttpClient } from '@triplit/client';
import { betterAuth } from 'better-auth/minimal';
import { schema } from '../triplit/schema';
const httpClient = new HttpClient({
schema,
serverUrl: process.env.NUXT_PUBLIC_TRIPLIT_URL,
token: process.env.TRIPLIT_SERVICE_TOKEN,
});
export const auth = betterAuth({
database: drizzleAdapter(useDrizzle(), {
provider: "pg",
schema: {
...schema
}
database: triplitAdapter({
httpClient,
secretKey: process.env.BETTER_AUTH_SECRET,
}),
session: {
cookieCache: {
enabled: true,
maxAge: 5 * 60,
},
},
trustedOrigins: [process.env.NUXT_PUBLIC_URL ?? 'http://localhost:3000'],
emailAndPassword: {
// if DISABLE_LOCAL_AUTH is set to "1" or "true" then local auth is disabled
enabled: process.env.DISABLE_LOCAL_AUTH?.toLowerCase() !== "true" && process.env.DISABLE_LOCAL_AUTH !== "1",
disableSignUp: process.env.DISABLE_SIGNUP?.toLowerCase() === "true" || process.env.DISABLE_SIGNUP === "1",
enabled: process.env.DISABLE_LOCAL_AUTH?.toLowerCase() !== 'true' && process.env.DISABLE_LOCAL_AUTH !== '1',
disableSignUp: process.env.DISABLE_SIGNUP?.toLowerCase() === 'true' || process.env.DISABLE_SIGNUP === '1',
},
})
});