11import LoadingIcon from "@/src/components/shared/loading/LoadingIcon" ;
22import { selectIsManaged } from "@/src/reduxStore/states/general" ;
3- import { openModal , setModalStates } from "@/src/reduxStore/states/modal" ;
3+ import { closeModal , openModal , setModalStates } from "@/src/reduxStore/states/modal" ;
44import { selectAttributes , selectEmbeddings } from "@/src/reduxStore/states/pages/settings" ;
55import { selectProjectId } from "@/src/reduxStore/states/project" ;
66import { Embedding , EmbeddingState } from "@/src/types/components/projects/projectId/settings/embeddings" ;
@@ -19,7 +19,7 @@ import DeleteEmbeddingModal from "./DeleteEmbeddingModal";
1919import { useWebsocket } from "@/src/services/base/web-sockets/useWebsocket" ;
2020
2121
22- export default function Embeddings ( ) {
22+ export default function Embeddings ( props : { refetchEmbeddings : ( ) => void } ) {
2323 const dispatch = useDispatch ( ) ;
2424 const router = useRouter ( ) ;
2525
@@ -58,6 +58,7 @@ export default function Embeddings() {
5858 const loadingEmbeddingsDictCopy = { ...loadingEmbeddingsDict }
5959 delete loadingEmbeddingsDictCopy [ msgParts [ 2 ] ] ;
6060 setLoadingEmbeddingsDict ( loadingEmbeddingsDictCopy ) ;
61+ props . refetchEmbeddings ( ) ;
6162 } else if ( msgParts [ 1 ] == 'upload_embedding_payload' ) {
6263 if ( loadingEmbeddingsDict [ msgParts [ 2 ] ] == undefined ) {
6364 const loadingEmbeddingsDictCopy = { ...loadingEmbeddingsDict } ;
@@ -119,7 +120,7 @@ export default function Embeddings() {
119120 < IconNotes onClick = { ( ) => embedding . onQdrant ? dispatch ( setModalStates ( ModalEnum . FILTERED_ATTRIBUTES , { embeddingId : embedding . id , open : true , attributeNames : prepareAttributeDataByNames ( embedding . filterAttributes ) , showEditOption : showEditOption } ) ) : null }
120121 className = { `h-6 w-6 ${ embedding . filterAttributes && embedding . filterAttributes . length > 0 ? 'text-gray-700' : 'text-gray-300' } ${ embedding . onQdrant ? "" : "cursor-not-allowed opacity-50" } ` } />
121122 </ Tooltip >
122- </ td > : < td > < LoadingIcon /> </ td > }
123+ </ td > : < td className = "whitespace-nowrap text-center px-3 py-2 text-sm text-gray-500 flex justify-center" > < LoadingIcon /> </ td > }
123124 < td className = "whitespace-nowrap text-center px-3 py-2 text-sm text-gray-500" >
124125 < div className = "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800" >
125126 { embedding . state == EmbeddingState . QUEUED ? '' : embedding . type == 'ON_ATTRIBUTE' ? 'Attribute Specific' : 'Token Specific' }
0 commit comments