From d29f95bacf2a733db0faa67ac481afeb7ec9e6f3 Mon Sep 17 00:00:00 2001 From: Zoe <62722391+juls0730@users.noreply.github.com> Date: Thu, 12 Feb 2026 14:56:13 +0000 Subject: [PATCH] feat: add better provider support, icons, regen, and a lot more --- AGENTS.md | 366 ++++--- BUGS.md | 10 +- LICENSE | 21 + app/app.vue | 6 + app/assets/css/base.css | 9 +- app/components/ChatInput.vue | 24 +- app/components/Dropdown.vue | 2 +- app/components/Logo/Ai2.vue | 25 + app/components/Logo/Ai21.vue | 25 + app/components/Logo/AionLabs.vue | 206 ++++ app/components/Logo/Anthropic.vue | 25 + app/components/Logo/Arcee.vue | 25 + app/components/Logo/Aya.vue | 26 + app/components/Logo/BaiduCloud.vue | 29 + app/components/Logo/ByteDance.vue | 31 + app/components/Logo/ChatGLM.vue | 41 + app/components/Logo/Claude.vue | 26 + app/components/Logo/Cohere.vue | 30 + app/components/Logo/DeepCogito.vue | 26 + app/components/Logo/DeepMind.vue | 26 + app/components/Logo/DeepSeek.vue | 26 + app/components/Logo/EssentialAI.vue | 42 + app/components/Logo/GLMV.vue | 54 + app/components/Logo/Gemini.vue | 16 +- app/components/Logo/Gemma.vue | 42 + app/components/Logo/Google.vue | 32 + app/components/Logo/Grok.vue | 10 +- app/components/Logo/Hunyuan.vue | 44 + app/components/Logo/IBM.vue | 25 + app/components/Logo/Inception.vue | 25 + app/components/Logo/Inflection.vue | 25 + app/components/Logo/InternLM.vue | 53 + app/components/Logo/Kwaipilot.vue | 51 + app/components/Logo/LICENSE | 24 + app/components/Logo/Liquid.vue | 25 + app/components/Logo/LongCat.vue | 27 + app/components/Logo/Meta.vue | 132 +++ app/components/Logo/Microsoft.vue | 27 + app/components/Logo/Minimax.vue | 41 + app/components/Logo/Mistral.vue | 37 + app/components/Logo/Moonshot.vue | 25 + app/components/Logo/Morph.vue | 25 + app/components/Logo/NousResearch.vue | 28 + app/components/Logo/Nova.vue | 58 ++ app/components/Logo/Nvidia.vue | 26 + app/components/Logo/OpenAI.vue | 52 + app/components/Logo/Openrouter.vue | 25 + app/components/Logo/PaLM.vue | 37 + app/components/Logo/Perplexity.vue | 26 + app/components/Logo/Qwen.vue | 39 + app/components/Logo/Relace.vue | 25 + app/components/Logo/Stepfun.vue | 42 + app/components/Logo/Upstage.vue | 50 + app/components/Logo/VertexAI.vue | 47 + app/components/Logo/Wenxin.vue | 44 + app/components/Logo/XiaomiMiMo.vue | 25 + app/components/Logo/ZAI.vue | 25 + app/components/Markdown/AstNode.vue | 15 + app/components/Markdown/Renderer.vue | 18 +- app/components/Markdown/ShikiHighlight.vue | 120 ++- app/components/Message/Agent/Error.vue | 22 +- app/components/Message/Agent/Tool/Debug.vue | 58 +- app/components/Message/Agent/Tool/index.vue | 28 +- app/components/Message/Agent/index.vue | 53 +- app/components/Message/index.vue | 154 ++- app/components/ModelIcon.vue | 10 +- app/components/ModelInfo.vue | 136 +++ app/components/ModelSelector.vue | 194 ++-- app/components/Settings/AIServiceProvider.vue | 276 ++++-- .../Settings/AppearanceSettings.vue | 3 + app/components/Settings/Dialog.vue | 31 +- app/components/Settings/ModelItem.vue | 15 + app/components/Settings/ProviderSettings.vue | 24 +- app/components/Settings/ProviderSidebar.vue | 6 +- app/components/Settings/SystemAssistants.vue | 62 ++ app/components/Sidenav/Header.vue | 34 +- app/components/Sidenav/HeaderAgent.vue | 43 +- app/components/Sidenav/NavAgent.vue | 103 +- app/components/Sidenav/NavHome.vue | 29 +- app/components/Sidenav/index.vue | 104 +- app/components/Slider.vue | 21 +- app/composables/useAgents.ts | 28 +- app/composables/useAuth.ts | 220 ++++- app/composables/useAutoScroll.ts | 48 +- app/composables/useChat.ts | 314 ++++-- app/composables/useModels.ts | 65 +- app/composables/useSettings.ts | 2 + app/composables/useSidebar.ts | 2 +- app/composables/useSidenavContext.ts | 20 + app/composables/useUserSettings.ts | 8 + app/middleware/auth.global.ts | 36 +- app/pages/agent/[id]/index.vue | 54 +- app/pages/agent/[id]/profile.vue | 11 +- app/pages/agent/[id]/topic/[topicId].vue | 244 ++++- app/pages/auth/login.vue | 41 +- app/pages/auth/register.vue | 42 +- app/pages/index.vue | 65 +- app/plugins/auth.client.ts | 10 +- app/plugins/auth.server.ts | 17 +- app/plugins/remark.ts | 6 +- app/types/model.ts | 10 +- app/utils/model-mapping.ts | 307 +++++- app/utils/search.ts | 42 + app/utils/settings.ts | 21 + bun.lock | 933 ++++++------------ lib/auth-client.ts | 3 - lib/auth.ts | 1 + nuxt.config.ts | 36 + package.json | 25 +- prompts/LICENSE | 23 + prompts/index.ts | 44 + server/api/chat/generate.post.ts | 713 ++++++++----- .../api/provider/[providerId]/models.post.ts | 316 ++++++ .../auto-rename/cancel/[renameId].post.ts | 19 + server/api/topic/auto-rename/index.post.ts | 93 ++ server/utils/ai-provider.ts | 108 ++ server/utils/cerebras.ts | 84 ++ server/utils/generations.ts | 12 +- server/utils/longcat.ts | 116 +++ server/utils/renames.ts | 26 + triplit/schema.ts | 136 ++- types/result.ts | 21 + uno.config.ts | 13 +- utils/assert.ts | 5 + 124 files changed, 6374 insertions(+), 1861 deletions(-) create mode 100644 LICENSE create mode 100644 app/components/Logo/Ai2.vue create mode 100644 app/components/Logo/Ai21.vue create mode 100644 app/components/Logo/AionLabs.vue create mode 100644 app/components/Logo/Anthropic.vue create mode 100644 app/components/Logo/Arcee.vue create mode 100644 app/components/Logo/Aya.vue create mode 100644 app/components/Logo/BaiduCloud.vue create mode 100644 app/components/Logo/ByteDance.vue create mode 100644 app/components/Logo/ChatGLM.vue create mode 100644 app/components/Logo/Claude.vue create mode 100644 app/components/Logo/Cohere.vue create mode 100644 app/components/Logo/DeepCogito.vue create mode 100644 app/components/Logo/DeepMind.vue create mode 100644 app/components/Logo/DeepSeek.vue create mode 100644 app/components/Logo/EssentialAI.vue create mode 100644 app/components/Logo/GLMV.vue create mode 100644 app/components/Logo/Gemma.vue create mode 100644 app/components/Logo/Google.vue create mode 100644 app/components/Logo/Hunyuan.vue create mode 100644 app/components/Logo/IBM.vue create mode 100644 app/components/Logo/Inception.vue create mode 100644 app/components/Logo/Inflection.vue create mode 100644 app/components/Logo/InternLM.vue create mode 100644 app/components/Logo/Kwaipilot.vue create mode 100644 app/components/Logo/LICENSE create mode 100644 app/components/Logo/Liquid.vue create mode 100644 app/components/Logo/LongCat.vue create mode 100644 app/components/Logo/Meta.vue create mode 100644 app/components/Logo/Microsoft.vue create mode 100644 app/components/Logo/Minimax.vue create mode 100644 app/components/Logo/Mistral.vue create mode 100644 app/components/Logo/Moonshot.vue create mode 100644 app/components/Logo/Morph.vue create mode 100644 app/components/Logo/NousResearch.vue create mode 100644 app/components/Logo/Nova.vue create mode 100644 app/components/Logo/Nvidia.vue create mode 100644 app/components/Logo/OpenAI.vue create mode 100644 app/components/Logo/Openrouter.vue create mode 100644 app/components/Logo/PaLM.vue create mode 100644 app/components/Logo/Perplexity.vue create mode 100644 app/components/Logo/Qwen.vue create mode 100644 app/components/Logo/Relace.vue create mode 100644 app/components/Logo/Stepfun.vue create mode 100644 app/components/Logo/Upstage.vue create mode 100644 app/components/Logo/VertexAI.vue create mode 100644 app/components/Logo/Wenxin.vue create mode 100644 app/components/Logo/XiaomiMiMo.vue create mode 100644 app/components/Logo/ZAI.vue create mode 100644 app/components/ModelInfo.vue create mode 100644 app/components/Settings/AppearanceSettings.vue create mode 100644 app/components/Settings/ModelItem.vue create mode 100644 app/components/Settings/SystemAssistants.vue create mode 100644 app/composables/useSidenavContext.ts create mode 100644 app/composables/useUserSettings.ts create mode 100644 app/utils/search.ts create mode 100644 app/utils/settings.ts delete mode 100644 lib/auth-client.ts create mode 100644 prompts/LICENSE create mode 100644 prompts/index.ts create mode 100644 server/api/provider/[providerId]/models.post.ts create mode 100644 server/api/topic/auto-rename/cancel/[renameId].post.ts create mode 100644 server/api/topic/auto-rename/index.post.ts create mode 100644 server/utils/ai-provider.ts create mode 100644 server/utils/cerebras.ts create mode 100644 server/utils/longcat.ts create mode 100644 server/utils/renames.ts create mode 100644 types/result.ts create mode 100644 utils/assert.ts diff --git a/AGENTS.md b/AGENTS.md index 4f4c5bf..bb3e21e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,19 +1,34 @@ -# AGENTS.md +# Veridian AGENTS.md -This file contains guidelines and commands for agentic coding agents working in -the Veridian repository. +**Nuxt 4 AI chat platform with Triplit database + better-auth** -## Project Overview +## Architecture Overview -Veridian is a Nuxt 4 application built with TypeScript, using Triplit with -better-auth for authentication, and UnoCSS for styling. The app is an agnetic -chat platform that is meant to provide a well rounded experience for interacting -with LLMs as well as providing a way to manage agents and provide helpful tools -like RAG (retrieval augmented generation) and web scraping/search. +``` +app/ # Nuxt 4 application (SSR) +├── components/ # Vue components (Sidenav, Message, Settings, etc.) +├── composables/ # Shared state (useChat, useAuth, useModels, etc.) +├── layouts/ # Auth and default layouts +├── middleware/ # Global auth middleware +├── pages/ # File-based routing (/, /auth/*, /agent/*) +├── plugins/ # Auth plugins (client/server), remark markdown +├── types/ # TypeScript interfaces +└── utils/ # Crypto, model-mapping, search utilities -You should be connected to the Nuxt docs MCP server, if you need to reference -the documentation or are unsure on how to implement something, consult the -docs. +server/ # Server-side API routes +└── api/ + ├── auth/ # Better-auth handler + ├── chat/ # Generation, cancel endpoints + └── provider/ # Model fetching from providers + +triplit/ # Database +├── schema.ts # Full schema with auth + app collections +└── auth-schema.ts # Auth collections (users, sessions, accounts) + +lib/ # Shared utilities +├── auth.ts # Better-auth server config +└── auth-client.ts # Better-auth client +``` ## Core Commands @@ -26,215 +41,172 @@ database commands. - `bunx triplit schema push` - Push schema changes to database -## Tech Stack & Dependencies +## Code Style -- **Framework**: Nuxt 4 (SSR enabled) -- **Language**: TypeScript with strict configuration -- **Database**: Triplit (next generation fullstack syncing database, sort of - like convex) -- **Auth**: better-auth with email/password and social providers -- **Styling**: UnoCSS with presetMini -- **Icons**: @nuxt/icon with Iconify, use Myna UI Icons +- **Indentation**: 4 spaces (no tabs) +- **Semicolons**: Always required +- **Equality**: Strict equality only (`===`, `!==`) +- **Components**: PascalCase, never self-closing tags +- **Functions**: camelCase for functions, PascalCase for constructors/classes +- **Constants**: SCREAMING_SNAKE_CASE for constants, camelCase for const values +- **Files**: kebab-case for files, PascalCase for Vue components +- **State**: `useState('prefix:name', () => default)` for reactive state -## Code Style Guidelines +## Imports Order -**Follow the LLVM golden rule: If you are extending, enhancing, or bug fixing -already implemented code, use the style that is already being used so that -the source is uniform and easy to follow.** +Group imports in this order (alphabetical within groups): +1. Type imports (`types/`) +2. Dependency imports (npm packages) +3. Triplit imports (`#triplit/`, `@triplit/`) +4. Vue/Nuxt imports (`vue`, `#app`, `~~/`, `~/`, `@/`) +5. Local imports (`lib/`, `server/`) -- **Always end lines with a semicolon regardless of surrounding code** -- Use 4 spaces for indentation -- Use consistent naming conventions for variables, functions, and constants -- Always use strict equality checks (`===` and `!==`) instead of loose equality - checks (`==` and `!=`) -- Prefer using explicity equality checks over truthy/falsy checks - e.g., prefer `if (value !== null)` instead of `if (value)` -- Always check existing code patterns before implementing new features -- Follow existing component and composable structures -- Use proper TypeScript types for all function parameters and returns -- Implement proper cleanup in composables (e.g., useClickOutside) -- Prefer reactive state management over direct DOM manipulation -- Keep components focused and single-purpose -- Use semantic HTML elements where appropriate - -### General Structure - -- Use Nuxt's app directory structure (`app/`, `server/`, `lib/`) -- Auth configuration in `lib/auth.ts` -- Server API routes go in `server/api/` -- Composables go in `app/composables/` -- Database schema in `db/schema.ts` -- Database migrations in `db/migrations/` - -### TypeScript Guidelines - -- Use strict TypeScript with no implicit any -- Export types and interfaces explicitly -- Use `computed()` and `ref()` from Vue 3 reactivity system -- Type API responses and database models - -### Vue Components - -- **Never use self-closing tags, excluding images, br, hr, and input** -- Use `