diff --git a/README.md b/README.md index 3354812..61f8e4c 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ IDK, calm down - [ ] File support - [ ] Streams on the server - [ ] Syntax highlighting with Shiki/markdown renderer +- [ ] Eliminate FOUC +- [ ] Cascade deletes and shit in Convex +- [ ] Error notification central, specially for BYOK models like o3 ### Extra @@ -51,3 +54,4 @@ IDK, calm down - [ ] Chat branching - [ ] Image generation - [ ] Chat sharing +- [ ] 404 page/redirect diff --git a/package.json b/package.json index 12b1975..4da316a 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,11 @@ }, "dependencies": { "@floating-ui/dom": "^1.7.1", - "better-auth": "^1.2.9" + "@fontsource-variable/fraunces": "^5.2.7", + "@fontsource-variable/geist-mono": "^5.2.6", + "@fontsource-variable/inter": "^5.2.6", + "better-auth": "^1.2.9", + "openai": "^5.3.0", + "zod": "^3.25.64" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34f5499..4871b90 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,9 +11,24 @@ importers: '@floating-ui/dom': specifier: ^1.7.1 version: 1.7.1 + '@fontsource-variable/fraunces': + specifier: ^5.2.7 + version: 5.2.7 + '@fontsource-variable/geist-mono': + specifier: ^5.2.6 + version: 5.2.6 + '@fontsource-variable/inter': + specifier: ^5.2.6 + version: 5.2.6 better-auth: specifier: ^1.2.9 version: 1.2.9 + openai: + specifier: ^5.3.0 + version: 5.3.0(ws@8.18.2)(zod@3.25.64) + zod: + specifier: ^3.25.64 + version: 3.25.64 devDependencies: '@better-auth-kit/convex': specifier: ^1.2.2 @@ -564,6 +579,15 @@ packages: '@floating-ui/utils@0.2.9': resolution: {integrity: sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==} + '@fontsource-variable/fraunces@5.2.7': + resolution: {integrity: sha512-PYIcwL3+0SA2IEAcA9ma07Rz8DCbJdLy7Hb1syq/FIcCyf1zSlHRRcC0a33PnBCZ9Q7B+01kFH0cS29yqWEk3w==} + + '@fontsource-variable/geist-mono@5.2.6': + resolution: {integrity: sha512-vw6T9JGTrYJ980bn7W8iTPhe2jVK5ifunVs7xh9dfTVArjDSkJs03JjeZrH5LKEpGABLXSlSlNU57HRm4tmFMg==} + + '@fontsource-variable/inter@5.2.6': + resolution: {integrity: sha512-jks/bficUPQ9nn7GvXvHtlQIPudW7Wx8CrlZoY8bhxgeobNxlQan8DclUJuYF2loYRrGpfrhCIZZspXYysiVGg==} + '@hexagon/base64@1.1.28': resolution: {integrity: sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw==} @@ -1791,6 +1815,18 @@ packages: nwsapi@2.2.20: resolution: {integrity: sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==} + openai@5.3.0: + resolution: {integrity: sha512-VIKmoF7y4oJCDOwP/oHXGzM69+x0dpGFmN9QmYO+uPbLFOmmnwO+x1GbsgUtI+6oraxomGZ566Y421oYVu191w==} + hasBin: true + peerDependencies: + ws: ^8.18.0 + zod: ^3.23.8 + peerDependenciesMeta: + ws: + optional: true + zod: + optional: true + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -2754,6 +2790,12 @@ snapshots: '@floating-ui/utils@0.2.9': {} + '@fontsource-variable/fraunces@5.2.7': {} + + '@fontsource-variable/geist-mono@5.2.6': {} + + '@fontsource-variable/inter@5.2.6': {} + '@hexagon/base64@1.1.28': {} '@humanfs/core@0.19.1': {} @@ -3998,6 +4040,11 @@ snapshots: nwsapi@2.2.20: {} + openai@5.3.0(ws@8.18.2)(zod@3.25.64): + optionalDependencies: + ws: 8.18.2 + zod: 3.25.64 + optionator@0.9.4: dependencies: deep-is: 0.1.4 diff --git a/src/app.css b/src/app.css index f7ce0eb..70e026c 100644 --- a/src/app.css +++ b/src/app.css @@ -1,4 +1,7 @@ @import 'tailwindcss'; +@import '@fontsource-variable/inter'; +@import '@fontsource-variable/geist-mono'; +@import '@fontsource-variable/fraunces'; @custom-variant dark (&:where(.dark, .dark *)); @@ -35,6 +38,14 @@ --sidebar-accent-foreground: oklch(0.3963 0.0251 285.1962); --sidebar-border: oklch(0.9383 0.0026 48.7178); --sidebar-ring: oklch(0.5916 0.218 0.5844); + --font-sans: + ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Segoe UI Symbol', 'Noto Color Emoji'; + --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; + --font-mono: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', + monospace; --radius: 0.5rem; --shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05); --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05); @@ -53,8 +64,8 @@ --card-foreground: oklch(0.8456 0.0302 341.4597); --popover: oklch(0.1548 0.0132 338.9015); --popover-foreground: oklch(0.9647 0.0091 341.8035); - --primary: oklch(0.4607 0.1853 4.0994); - --primary-foreground: oklch(0.856 0.0618 346.3684); + --primary: oklch(0.5797 0.1194 237.7893); + --primary-foreground: oklch(1 0 0); --secondary: oklch(0.3137 0.0306 310.061); --secondary-foreground: oklch(0.8483 0.0382 307.9613); --muted: oklch(0.2634 0.0219 309.4748); @@ -65,7 +76,7 @@ --destructive-foreground: oklch(1 0 0); --border: oklch(0.3286 0.0154 343.4461); --input: oklch(0.3387 0.0195 332.8347); - --ring: oklch(0.5916 0.218 0.5844); + --ring: oklch(0.5797 0.1194 237.7893); --chart-1: oklch(0.5316 0.1409 355.1999); --chart-2: oklch(0.5633 0.1912 306.8561); --chart-3: oklch(0.7227 0.1502 60.5799); @@ -78,7 +89,15 @@ --sidebar-accent: oklch(0.2337 0.0261 338.1961); --sidebar-accent-foreground: oklch(0.9674 0.0013 286.3752); --sidebar-border: oklch(0 0 0); - --sidebar-ring: oklch(0.5916 0.218 0.5844); + --sidebar-ring: oklch(0.5797 0.1194 237.7893); + --font-sans: + ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Segoe UI Symbol', 'Noto Color Emoji'; + --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; + --font-mono: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', + monospace; --radius: 0.5rem; --shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05); --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05); @@ -90,6 +109,59 @@ --shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25); } +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --color-chart-1: var(--chart-1); + --color-chart-2: var(--chart-2); + --color-chart-3: var(--chart-3); + --color-chart-4: var(--chart-4); + --color-chart-5: var(--chart-5); + --color-sidebar: var(--sidebar); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-ring: var(--sidebar-ring); + + --font-sans: var(--font-sans); + --font-mono: var(--font-mono); + --font-serif: var(--font-serif); + + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + + --shadow-2xs: var(--shadow-2xs); + --shadow-xs: var(--shadow-xs); + --shadow-sm: var(--shadow-sm); + --shadow: var(--shadow); + --shadow-md: var(--shadow-md); + --shadow-lg: var(--shadow-lg); + --shadow-xl: var(--shadow-xl); + --shadow-2xl: var(--shadow-2xl); +} + @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); @@ -125,12 +197,13 @@ --color-sidebar-ring: var(--sidebar-ring); --font-sans: - ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, - 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Inter Variable', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', + Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + --font-serif: 'Fraunces Variable', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; --font-mono: - ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', - monospace; + 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); diff --git a/src/app.html b/src/app.html index 179171a..4afcbd3 100644 --- a/src/app.html +++ b/src/app.html @@ -7,7 +7,7 @@
(provider: Provider) {
+ return page.data.models[provider].map((m: { id: string }) => {
+ return {
+ ...m,
+ enabled: this.enabled[getModelKey({ provider, model_id: m.id })] !== undefined,
+ };
+ }) as Array