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

Function fetchData

frontend/src/components/actions/index.tsx:64–83  ·  view source on GitHub ↗
(params: any)

Source from the content-addressed store, hash-verified

62 setTipSchema(value)
63 }
64 const fetchData = async (params: any) => {
65 setLoading(true);
66 try {
67 const res: any = await getActionsList(params)
68 const data = res.data.map((item: any) => {
69 return {
70 ...item,
71 key: item.action_id,
72 method: getFirstMethodAndEndpoint(item.openapi_schema)?.method,
73 endpoint: getFirstMethodAndEndpoint(item.openapi_schema)?.endpoint
74 }
75 })
76
77 setPluginFunList(data)
78 setHasMore(res.has_more)
79 } catch (error) {
80 console.log(error)
81 }
82 setLoading(false);
83 };
84 const handleCreatePrompt = async (value: boolean) => {
85 setSchema('')
86 setActionId('')

Callers 1

handleChildEventFunction · 0.70

Calls 3

getActionsListFunction · 0.90
setLoadingFunction · 0.85

Tested by

no test coverage detected