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

Function fetchEditFormData

frontend/src/components/modelsPage/index.tsx:260–272  ·  view source on GitHub ↗
(model_id: string, provider_id: string)

Source from the content-addressed store, hash-verified

258 setEditLoading(false)
259 }
260 const fetchEditFormData = async (model_id: string, provider_id: string) => {
261 try {
262 const res = await getModelsForm(model_id)
263 const res1 = await getAiModelsForm(provider_id)
264 setFormData(res1.data.credentials_schema)
265 form.setFieldsValue(res.data.display_credentials)
266 } catch (e) {
267 const error = e as ApiErrorResponse
268 const errorMessage = error.response.data.error.message
269 toast.error(errorMessage)
270 }
271
272 }
273 const handleConfirm = async () => {
274 const function_call = propertyForm.getFieldValue('function_call')
275 const wildcardFunctioncall = wildcardForm.getFieldValue('function_call')

Callers 1

handleEditFunction · 0.85

Calls 2

getModelsFormFunction · 0.90
getAiModelsFormFunction · 0.90

Tested by

no test coverage detected