MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / fetchData

Function fetchData

frontend/src/components/chunkPage/index.tsx:130–147  ·  view source on GitHub ↗
(collectionId: string, params: Record<string, any>)

Source from the content-addressed store, hash-verified

128 fetchData(collectionId, params)
129 }, [collectionId])
130 const fetchData = async (collectionId: string, params: Record<string, any>) => {
131 setLoading(true);
132 try {
133 const res: any = await getRecordsList(collectionId, params)
134 const data = res.data.map((item: any) => {
135 return {
136 ...item,
137 key: item.chunk_id
138 }
139 })
140 setRecordList(data);
141 setHasMore(res.has_more)
142
143 } catch (error) {
144 console.log(error)
145 }
146 setLoading(false);
147 };
148 const handleCreatePrompt = () => {
149 setContentValue('')
150 setRecordId('')

Callers 4

handleChildEventFunction · 0.70
ChunkPageFunction · 0.70
onDeleteConfirmFunction · 0.70
handleConfirmFunction · 0.70

Calls 2

getRecordsListFunction · 0.90
setLoadingFunction · 0.85

Tested by

no test coverage detected