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

Function handleTools

frontend/src/components/plugins/index.tsx:154–178  ·  view source on GitHub ↗
(record: any)

Source from the content-addressed store, hash-verified

152
153 }
154 const handleTools = async (record: any) => {
155 setLoading(true)
156 try {
157 setPluginListData(record.plugins)
158 setPluginName(record.plugins[0].name)
159 setPluginDesc(record.plugins[0].description)
160 setBundleName(record.name)
161 setPluginId(record.plugins[0].plugin_id)
162 const inputSchematemp = record.plugins[0].input_schema
163 const arr: any[] = []
164 Object.values(inputSchematemp).forEach((item: any) => {
165 arr.push(item)
166 })
167 setInputSchema(arr)
168 setOpenEditDrawer(true)
169 setBundleId(record.bundle_id)
170 setIsShowBundle(false)
171 } catch (e) {
172 const error = e as ApiErrorResponse
173 toast.error(error.response.data.error.message)
174 } finally {
175 setLoading(false)
176 }
177
178 }
179 const handleCopy = (text: string) => {
180 const clipboard = new ClipboardJS('.icon-copy', {
181 text: () => text

Callers 1

PluginsFunction · 0.85

Calls 1

setLoadingFunction · 0.85

Tested by

no test coverage detected