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

Function handleEdit

frontend/src/components/actions/index.tsx:114–137  ·  view source on GitHub ↗
(val: any)

Source from the content-addressed store, hash-verified

112 ),
113 },)
114 const handleEdit = async (val: any) => {
115 setLoading(true)
116 setTipSchema(false)
117 const res = await getActionsDetail(val.action_id)
118 const formattedData = JSON.stringify(res.data.openapi_schema, null, 4);
119 setDrawerTitle(`${t('projectToolsEditAction')}`)
120 setActionId(val.action_id)
121 setSchema(formattedData)
122 if (res.data.authentication) {
123 if (res.data.authentication.content) {
124 setRadioValue('custom')
125 setCustom(Object.keys(res.data.authentication.content)[0])
126 setAuthentication(Object.values(res.data.authentication.content)[0] as string)
127 } else {
128 setRadioValue(res.data.authentication.type)
129 setAuthentication(res.data.authentication.secret)
130 }
131 } else {
132 setRadioValue('none')
133 setAuthentication('')
134 }
135 setLoading(false)
136 setOpenDrawer(true)
137 }
138 const handleRequest = async () => {
139
140 if (!schema) {

Callers 1

ActionsFunction · 0.70

Calls 2

getActionsDetailFunction · 0.90
setLoadingFunction · 0.85

Tested by

no test coverage detected