This commit is contained in:
DDDDD12138 2024-11-01 10:58:22 +08:00 committed by GitHub
commit 79245d6f1c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -522,12 +522,14 @@ export function ChatActions(props: {
const isMobileScreen = useMobileScreen();
const { setAttachImages, setUploading } = props;
useEffect(() => {
const show = isVisionModel(currentModel);
setShowUploadImage(show);
if (!show) {
props.setAttachImages([]);
props.setUploading(false);
setAttachImages([]);
setUploading(false);
}
// if current model is not available
@ -547,7 +549,7 @@ export function ChatActions(props: {
: nextModel.name,
);
}
}, [chatStore, currentModel, models]);
}, [chatStore, currentModel, models, setAttachImages, setUploading]);
return (
<div className={styles["chat-input-actions"]}>