- Add chat components (header, composer, conversation, message, thinking response, identity) - Add chat hooks (use-chat-agent, use-chat-composer) - Add chat lib (constants, transforms, types) - Wire agent model config through env (provider, name, api, base url, key, context window, max tokens) - Refresh web styling and routes
19 lines
569 B
TypeScript
19 lines
569 B
TypeScript
import { createEnv } from "@t3-oss/env-core";
|
|
import { z } from "zod";
|
|
|
|
const convexUrlSchema = (exampleHost: string) =>
|
|
z.url().refine((url) => new URL(url).hostname !== exampleHost, {
|
|
message: `Replace the ${exampleHost} placeholder before running the app`,
|
|
});
|
|
|
|
export const env = createEnv({
|
|
client: {
|
|
VITE_CONVEX_SITE_URL: convexUrlSchema("example.convex.site"),
|
|
VITE_CONVEX_URL: convexUrlSchema("example.convex.cloud"),
|
|
VITE_FLUE_URL: z.url(),
|
|
},
|
|
clientPrefix: "VITE_",
|
|
emptyStringAsUndefined: true,
|
|
runtimeEnv: import.meta.env,
|
|
});
|