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

Function handleConfirm

frontend/src/components/createPlugin/index.tsx:126–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124 setOpenCreateModal3(false)
125 }
126 const handleConfirm = async () => {
127 form.validateFields().then(async () => {
128 try {
129 const credentials = form.getFieldsValue()
130 const params = {
131 name: bundleName,
132 credentials,
133 bundle_id: bundleId,
134 }
135 setConfirmLoading(true)
136 await createPlugin(params)
137 const params1 = {
138 limit: 100,
139 offset: 0,
140 lang: 'en'
141 }
142 await getBundleList(params1)
143 handleConfirmRequest()
144 setOpenCreateModal3(false)
145 setOpenCreateModal2(false)
146 handleCloseModal()
147
148 toast.success('Creation successful!')
149 } catch (error) {
150 const apiError = error as ApiErrorResponse;
151 const errorMessage: string = apiError.response.data.error.message;
152 toast.error(errorMessage)
153 } finally {
154 setConfirmLoading(false)
155 }
156 })
157
158 }
159 const handleValuesChange = (changedValues: object) => {
160 form.validateFields(Object.keys(changedValues));
161 };

Callers

nothing calls this directly

Calls 4

createPluginFunction · 0.90
getBundleListFunction · 0.70
handleConfirmRequestFunction · 0.50
handleCloseModalFunction · 0.50

Tested by

no test coverage detected