(params: any)
| 62 | setTipSchema(value) |
| 63 | } |
| 64 | const fetchData = async (params: any) => { |
| 65 | setLoading(true); |
| 66 | try { |
| 67 | const res: any = await getActionsList(params) |
| 68 | const data = res.data.map((item: any) => { |
| 69 | return { |
| 70 | ...item, |
| 71 | key: item.action_id, |
| 72 | method: getFirstMethodAndEndpoint(item.openapi_schema)?.method, |
| 73 | endpoint: getFirstMethodAndEndpoint(item.openapi_schema)?.endpoint |
| 74 | } |
| 75 | }) |
| 76 | |
| 77 | setPluginFunList(data) |
| 78 | setHasMore(res.has_more) |
| 79 | } catch (error) { |
| 80 | console.log(error) |
| 81 | } |
| 82 | setLoading(false); |
| 83 | }; |
| 84 | const handleCreatePrompt = async (value: boolean) => { |
| 85 | setSchema('') |
| 86 | setActionId('') |
no test coverage detected