From 59bb7fbc1208b6996ee6b3a5bd27d3f10b9b794e Mon Sep 17 00:00:00 2001 From: Zoe <62722391+juls0730@users.noreply.github.com> Date: Thu, 19 Feb 2026 23:44:23 -0600 Subject: [PATCH] Performance enhancements galore! New themining system This is once again a huge commit, but its mostly performance improvements along with some bug fixes and refactoring. It also includes changes to the theming systems. I'm still not 100% happy with the theming system, but its better than before. Model fetching has been dramatically improved! Nearly all the important computation and pre-processing has been moved to the server. This has also somehow fixed the way model details are loaded, which was causing many models to be missing their details despite models.dev having them. The markdown renderer has once again been changed, but I'm mostly certain that this is the last time major changes will be made to it. The renderer is not spamming components, bloating memory usage, and its not using a bug prone custom written chunking system. There's also a lot more that I haven't mentioned and honestly forgot. I need to get better commit hygiene tbh. --- BUGS.md | 6 +- TODO.md | 22 +- app/app.vue | 32 +- app/assets/css/base.css | 365 ++++++++- app/components/ChatInput.vue | 46 +- app/components/Collapsible.vue | 15 + app/components/Dropdown.vue | 106 +-- app/components/Logo/AionLabs.vue | 180 +--- app/components/Logo/Cerebras.vue | 28 + app/components/Logo/Google.vue | 3 +- app/components/Logo/Ollama.vue | 25 + app/components/Markdown/AstNode.vue | 55 -- app/components/Markdown/Renderer.vue | 310 +------ app/components/Markdown/ShikiHighlight.vue | 104 +-- app/components/Message/Agent/Error.vue | 2 +- app/components/Message/Agent/Reasoning.vue | 46 +- app/components/Message/Agent/Tool/Debug.vue | 14 +- app/components/Message/Agent/Tool/index.vue | 12 +- app/components/Message/Agent/index.vue | 4 +- app/components/Message/User.vue | 2 +- app/components/Message/index.vue | 12 +- app/components/ModelIcon.vue | 4 +- app/components/ModelInfo.vue | 44 +- app/components/ModelSelector.vue | 170 ++-- app/components/Settings/AIServiceProvider.vue | 192 ++--- .../Settings/AppearanceSettings.vue | 82 +- app/components/Settings/Dialog.vue | 10 +- app/components/Settings/GeneralSettings.vue | 1 + app/components/Settings/ModelItem.vue | 4 +- app/components/Settings/ProviderSettings.vue | 36 +- app/components/Settings/ProviderSidebar.vue | 22 +- app/components/Settings/SystemAssistants.vue | 38 +- app/components/Sidenav/Header.vue | 80 +- app/components/Sidenav/HeaderAgent.vue | 67 +- app/components/Sidenav/Item.vue | 10 +- app/components/Sidenav/NavAgent.vue | 313 +++---- app/components/Sidenav/NavHome.vue | 115 +-- app/components/Sidenav/index.vue | 65 +- app/components/Slider.vue | 59 +- app/components/ThemeSwitcher.vue | 42 +- app/composables/useAgents.ts | 9 +- app/composables/useChat.ts | 129 ++- app/composables/useDropdown.ts | 77 ++ app/composables/useModels.ts | 2 + app/composables/useSidebar.ts | 2 +- app/composables/useTheme.ts | 55 ++ app/composables/useUserSettings.ts | 142 +++- app/layouts/auth.vue | 6 +- app/layouts/default.vue | 13 +- app/pages/agent/[id]/index.vue | 70 +- app/pages/agent/[id]/profile.vue | 6 +- app/pages/agent/[id]/topic/[topicId].vue | 149 ++-- app/pages/index.vue | 59 +- app/plugins/auth.server.ts | 1 + app/plugins/remark.ts | 2 +- app/plugins/shiki.client.ts | 25 + app/plugins/shiki.server.ts | 24 + app/types/dropdown.ts | 5 +- app/types/model.ts | 2 +- app/utils/hash.ts | 1 + app/utils/model-mapping.ts | 42 +- app/utils/settings.ts | 2 - app/utils/shiki.ts | 39 + app/utils/sort.ts | 7 + app/workers/shiki.ts | 25 + bun.lock | 775 +++++++++++++++--- lib/auth.ts | 2 + nuxt.config.ts | 104 ++- package.json | 145 ++-- patches/@triplit%2Fdb@1.1.10.patch | 174 +++- server/api/chat/cancel/[generationId].post.ts | 17 +- server/api/chat/generate.post.ts | 42 +- .../api/provider/[providerId]/models.post.ts | 370 ++++++--- .../auto-rename/cancel/[renameId].post.ts | 11 +- server/api/topic/auto-rename/index.post.ts | 32 +- server/lib/triplit.ts | 2 +- server/middleware/log-render-time.ts | 10 + server/utils/ai-provider.ts | 122 ++- server/utils/longcat.ts | 2 +- server/utils/models-dev.ts | 51 ++ server/utils/renames.ts | 29 +- triplit/schema.ts | 7 + tsconfig.json | 10 +- types/result.ts | 13 +- uno.config.ts | 7 - 85 files changed, 3523 insertions(+), 2039 deletions(-) create mode 100644 app/components/Collapsible.vue create mode 100644 app/components/Logo/Cerebras.vue create mode 100644 app/components/Logo/Ollama.vue delete mode 100644 app/components/Markdown/AstNode.vue create mode 100644 app/composables/useDropdown.ts create mode 100644 app/plugins/shiki.client.ts create mode 100644 app/plugins/shiki.server.ts create mode 100644 app/utils/shiki.ts create mode 100644 app/utils/sort.ts create mode 100644 app/workers/shiki.ts create mode 100644 server/middleware/log-render-time.ts create mode 100644 server/utils/models-dev.ts diff --git a/BUGS.md b/BUGS.md index 0d3ff46..2427d90 100644 --- a/BUGS.md +++ b/BUGS.md @@ -4,10 +4,10 @@ I'm not entire sure why, I think its a race condition, but I'm not sure. I _do not_ think that triplit-nuxt is the culprit, but I'm not sure. -2. [X] The logic to handle hovering over the sidebar is half-baked at best. On the +2. [x] The logic to handle hovering over the sidebar is half-baked at best. On the agents route, the back arrow sometimes stays full sized -3. [X] If you open the theme switcher on the sidenav then close it and re-open +3. [x] If you open the theme switcher on the sidenav then close it and re-open it _without_ moving your mouse off of the sidenav, the agent button/dropdown trigger will slowly crawl to the right (likely related to #2). @@ -28,4 +28,4 @@ If input was typed into the chat input **before hydation** the message send button will be on the left. **THIS WAS BECAUSE OF GRAMMARLY. I HATE YOU GRAMMARLY.** -10. [ ] Multiple markdown blocks might be edited with the same content at the same time \ No newline at end of file +10. [ ] Multiple markdown blocks might be edited with the same content at the same time diff --git a/TODO.md b/TODO.md index ed12b3e..022be44 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,23 @@ # Todo -- [X] Standardize on one icon set rather than 4 (lmao) -- [ ] Make dropdowns a singleton component +- [x] Standardize on one icon set rather than 4 (lmao) +- [-] Make dropdowns a singleton component (work in progress) - [ ] Make the sidebar better :kekdoggo:. It's annoying to manage across routes +- [ ] Make topics manually renameable +- [ ] Improve latex rendering, make single line equations work _well_, and likely make it configurable +- [x] Implement appearence settings + - [x] Accent colors + - [x] Neutral colors + - [x] Hinting + - [ ] Font size/UI scale +- [ ] Fix custom longcat tool call +- [ ] add the ability to make a custom provider +- [ ] add browser testing (maybe https://vitest.dev/guide/browser/) +- [ ] Add a dropdown to the output token count on agent messages that shows you all the token info +- [ ] Add the ability to configure UI scale and font size +- [ ] Write good docs +- [ ] Custom theme colors +- [ ] Enable and disable all models button +- [ ] Make tools pluggable +- [ ] Make a tool connector that the server can use to connect to tools on a + remote system (would be helpful for agentic development tasks) diff --git a/app/app.vue b/app/app.vue index 7efa7a8..23f1520 100644 --- a/app/app.vue +++ b/app/app.vue @@ -1,4 +1,6 @@