From 5bd8dd4cb759bbabc35bdc00c66d88e4a175f7a8 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 12 May 2025 13:47:02 -0700 Subject: [PATCH] fix: dont toggle models when toggling assistants --- gui/src/components/modelSelection/ModelSelect.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 3523a7d9f..3e39d6315 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -166,7 +166,11 @@ function ModelSelect() { useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { - if (event.key === "'" && isMetaEquivalentKeyPressed(event as any)) { + if ( + event.key === "'" && + isMetaEquivalentKeyPressed(event as any) && + !event.shiftKey // To prevent collisions w/ assistant toggle logic + ) { if (!selectedProfile) { return; } @@ -179,7 +183,7 @@ function ModelSelect() { if (nextIndex < 0) nextIndex = options.length - 1; const newModelTitle = options[nextIndex].value; - dispatch( + void dispatch( updateSelectedModelByRole({ selectedProfile, role: "chat", @@ -219,7 +223,7 @@ function ModelSelect() { { if (val === selectedModel?.title) return; - dispatch( + void dispatch( updateSelectedModelByRole({ selectedProfile, role: mode === "edit" ? "edit" : "chat",