From 62f1fe1c2776068fdaed2b241d38192ba66eedaa Mon Sep 17 00:00:00 2001
From: Zoe <62722391+juls0730@users.noreply.github.com>
Date: Wed, 25 Feb 2026 16:12:51 +0000
Subject: [PATCH] fix: dropdown settings buttons | fix: improve model selector
I should have split this into two commits, but I found the issue with the
settings buttons *after* I changed how the model selector worked, so its
all in this single commit.
---
TODO.md | 2 +-
app/components/Dialog/Settings.vue | 27 ++-
app/components/Dialog/index.vue | 2 +-
app/components/ModelSelector.vue | 186 +++++++++++-------
app/components/Settings/AIServiceProvider.vue | 13 +-
app/components/Settings/ProviderSidebar.vue | 10 +-
app/composables/useDialog.ts | 5 +
nuxt.config.ts | 16 +-
8 files changed, 157 insertions(+), 104 deletions(-)
diff --git a/TODO.md b/TODO.md
index 022be44..d1d14ca 100644
--- a/TODO.md
+++ b/TODO.md
@@ -3,7 +3,7 @@
- [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
+- [x] 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
diff --git a/app/components/Dialog/Settings.vue b/app/components/Dialog/Settings.vue
index 62b1fcf..00b47e1 100644
--- a/app/components/Dialog/Settings.vue
+++ b/app/components/Dialog/Settings.vue
@@ -32,19 +32,24 @@ const PAGES_CONFIG = {
},
} as const;
-const { currentPage, pageParams, setPage, close } = useSettings();
+const props = defineProps<{
+ page: keyof typeof PAGES_CONFIG;
+ params?: string;
+}>();
+
+const { close, setOptions } = useDialog();
const runtimePage = computed(() => {
// 1. Get the base config (e.g., 'providers' or 'general')
- const config = PAGES_CONFIG[currentPage.value as keyof typeof PAGES_CONFIG] || PAGES_CONFIG.general;
+ const config = PAGES_CONFIG[props.page as keyof typeof PAGES_CONFIG] || PAGES_CONFIG.general;
// 2. Determine the actual component to show
let component = config.component;
let label = config.label as string;
- if (currentPage.value === 'providers' && pageParams.value.length > 0) {
+ if (props.page === 'providers' && props.params) {
component = AIServiceProvider;
- const providerId = pageParams.value[0];
+ const providerId = props.params;
const provider = providers.value!.find(p => p.id === providerId);
label = provider ? provider.name : 'Unknown Provider';
}
@@ -53,13 +58,13 @@ const runtimePage = computed(() => {
...config,
label,
component,
- params: pageParams.value,
+ params: props.params,
} as {
label: string;
icon: string;
component: Component;
sidebar?: Component;
- params: string[];
+ params: string;
};
});
@@ -68,10 +73,11 @@ const runtimePage = computed(() => {