From e6af5e77f86677631cc1c0791764d0f55493c738 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Tue, 11 Feb 2025 12:40:29 -0800 Subject: [PATCH] Models modal: simplify (disable the 'all services' button) --- src/modules/llms/models-modal/ModelsModal.tsx | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/modules/llms/models-modal/ModelsModal.tsx b/src/modules/llms/models-modal/ModelsModal.tsx index 85ff290ff7..0d42cd7b63 100644 --- a/src/modules/llms/models-modal/ModelsModal.tsx +++ b/src/modules/llms/models-modal/ModelsModal.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { Box, Checkbox, Divider } from '@mui/joy'; +import { Box, Divider } from '@mui/joy'; import type { DModelsService, DModelsServiceId } from '~/common/stores/llms/modelsservice.types'; import { GoodModal } from '~/common/components/modals/GoodModal'; @@ -28,7 +28,8 @@ export function ModelsModal(props: { suspendAutoModelsSetup?: boolean }) { // local state const [_selectedServiceId, setSelectedServiceId] = React.useState(null); - const [showAllServices, setShowAllServices] = React.useState(false); + // const [showAllServices, setShowAllServices] = React.useState(false); + const showAllServices = false; // external state const { showModels, showModelOptions } = useOptimaModelsModalsState(); @@ -41,7 +42,7 @@ export function ModelsModal(props: { suspendAutoModelsSetup?: boolean }) { const activeService = modelsServices.find(s => s.id === selectedServiceId); - const multiService = modelsServices.length > 1; + // const multiService = modelsServices.length > 1; // Auto-open this dialog - anytime no service is selected const autoOpenTrigger = !selectedServiceId && !props.suspendAutoModelsSetup; @@ -66,15 +67,16 @@ export function ModelsModal(props: { suspendAutoModelsSetup?: boolean }) { {showModels && Configure AI Models} open onClose={optimaActions().closeModels} + darkBottomClose animateEnter={llmCount === 0} unfilterBackdrop - startButton={ - multiService ? setShowAllServices(all => !all)} - /> : undefined - } + // startButton={ + // multiService ? setShowAllServices(all => !all)} + // /> : undefined + // } sx={{ // forces some shrinkage of the contents (ModelsList) overflow: 'auto', @@ -117,7 +119,7 @@ export function ModelsModal(props: { suspendAutoModelsSetup?: boolean }) { /> )} - + }