chore: toast message on model import fail with reason (#3276)

This commit is contained in:
Louis 2024-08-06 14:29:58 +07:00 committed by GitHub
parent d074a5a445
commit 3bebdfe67e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,8 @@ import { useAtomValue, useSetAtom } from 'jotai'
import { AlertCircle } from 'lucide-react' import { AlertCircle } from 'lucide-react'
import { toaster } from '@/containers/Toast'
import useCortex from '@/hooks/useCortex' import useCortex from '@/hooks/useCortex'
import { import {
getImportModelStageAtom, getImportModelStageAtom,
@ -41,6 +43,11 @@ const ImportingModelModal = () => {
} }
setImportModelError(model.path, errorMessage) setImportModelError(model.path, errorMessage)
toaster({
title: 'Import failed',
description: errorMessage,
type: 'error',
})
} }
} }
} }