Merge pull request #18496 from ShirasawaSama/patch-44

fix: Clear file list when selected models do not support file uploads
This commit is contained in:
Tim Baek
2025-10-21 16:36:05 -04:00
committed by GitHub

View File

@@ -55,6 +55,10 @@
$: fileUploadEnabled =
fileUploadCapableModels.length === selectedModels.length &&
($user?.role === 'admin' || $user?.permissions?.chat?.file_upload);
$: if (!fileUploadEnabled && files.length > 0) {
files = [];
}
const detectMobile = () => {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;