MCPcopy Create free account
hub / github.com/TaskingAI/TaskingAI / fetchDataRetrievalData

Function fetchDataRetrievalData

frontend/src/components/playground/index.tsx:974–994  ·  view source on GitHub ↗
(params: Record<string, any>)

Source from the content-addressed store, hash-verified

972
973 }
974 const fetchDataRetrievalData = async (params: Record<string, any>) => {
975 try {
976 const res: any = await getRetrievalList(params)
977 const data = res.data.map((item: any) => {
978 return {
979 ...item,
980 capacity1: item.num_chunks + '/' + item.capacity,
981 key: item.collection_id
982 }
983 })
984 setRetrievalList(data);
985 setHasMore(res.has_more)
986 setUpdateRetrievalPrevButton(true)
987
988 } catch (e) {
989 const apiResponse = e as ApiErrorResponse
990 const message = apiResponse.response.data.error.message
991 toast.error(message)
992 console.log(e)
993 }
994 }
995 const handleChangeName = (value: string) => {
996 setDrawerName(value)
997 }

Callers 3

initialFunctionFunction · 0.70
PlaygroundFunction · 0.70

Calls 1

getRetrievalListFunction · 0.90

Tested by

no test coverage detected