Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/Loader delete error #3002

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/ui/src/views/docstore/DeleteDocStoreDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const DeleteDocStoreDialog = ({ show, dialogProps, onCancel, onDelete }) => {
<Button onClick={onCancel} color='primary'>
Cancel
</Button>
<Button variant='contained' onClick={() => onDelete(dialogProps.type, removeFromVS)} color='error'>
<Button variant='contained' onClick={() => onDelete(dialogProps.type, dialogProps.file, removeFromVS)} color='error'>
Delete
</Button>
</DialogActions>
Expand Down
6 changes: 4 additions & 2 deletions packages/ui/src/views/docstore/DocumentStoreDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ const DocumentStoreDetails = () => {
}
}

const onDocStoreDelete = async (type, removeFromVectorStore) => {
const onDocStoreDelete = async (type, file, removeFromVectorStore) => {
setBackdropLoading(true)
setShowDeleteDocStoreDialog(false)
if (type === 'STORE') {
if (removeFromVectorStore) {
await deleteVectorStoreDataFromStore(storeId)
Expand Down Expand Up @@ -272,7 +273,8 @@ const DocumentStoreDetails = () => {
description: `Delete Loader ${file.loaderName} ? This will delete all the associated document chunks.`,
vectorStoreConfig,
recordManagerConfig,
type: 'LOADER'
type: 'LOADER',
file
}

setDeleteDocStoreDialogProps(props)
Expand Down
Loading