fix: dont toggle models when toggling assistants

This commit is contained in:
Patrick Erichsen 2025-05-12 13:47:02 -07:00
parent 1202c0a24b
commit 5bd8dd4cb7

View file

@ -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() {
<Listbox
onChange={async (val: string) => {
if (val === selectedModel?.title) return;
dispatch(
void dispatch(
updateSelectedModelByRole({
selectedProfile,
role: mode === "edit" ? "edit" : "chat",