MCPcopy Create free account
hub / github.com/TaskingAI/TaskingAI / handleActionRequest

Function handleActionRequest

frontend/src/components/playground/index.tsx:1067–1106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1065 setConfirmLoading(false)
1066 }
1067 const handleActionRequest = async () => {
1068 if (!schema) {
1069 setTipSchema(true)
1070
1071 return
1072 }
1073 const commonData: commonDataType = {
1074 openapi_schema: JSON.parse(schema),
1075 authentication: {
1076 type: radioValue,
1077 content: undefined,
1078 secret: undefined
1079 }
1080 };
1081 if (radioValue === 'custom') {
1082 if (commonData.authentication) {
1083 commonData.authentication.content = { [custom]: Authentication };
1084 }
1085 } else {
1086 if (radioValue === 'none') {
1087 (commonData.authentication as any).type = 'none'
1088 } else {
1089 if (commonData.authentication) {
1090 commonData.authentication.secret = Authentication;
1091 }
1092 }
1093 }
1094 try {
1095
1096 await createActions(commonData);
1097 const params = {
1098 limit: 20,
1099 }
1100 await fetchActionsList(params);
1101 } catch (error: any) {
1102 console.log(error)
1103 }
1104
1105 setOpenActionDrawer(false)
1106 }
1107 const handleNewModal = () => {
1108 setOpenCollectionDrawer(true)
1109 }

Callers 1

PlaygroundFunction · 0.70

Calls 2

createActionsFunction · 0.90
fetchActionsListFunction · 0.70

Tested by

no test coverage detected