Spaces:
Sleeping
Sleeping
David Prince
fix: add all missing local module stubs (remote_mcp_registry, mcp_auth, mcp_transport, etc)
cce8120 | "use client"; | |
| import {useState} from "react"; | |
| import lowcode from "../services/lowcode/client"; | |
| export default function useLowCode(){ | |
| const [loading,setLoading]=useState(false); | |
| async function run(fn,...args){ | |
| setLoading(true); | |
| try{ | |
| return await fn(...args); | |
| } | |
| finally{ | |
| setLoading(false); | |
| } | |
| } | |
| return{ | |
| loading, | |
| list:(...a)=>run(lowcode.list,...a), | |
| load:(...a)=>run(lowcode.load,...a), | |
| save:(...a)=>run(lowcode.save,...a), | |
| runWorkflow:(...a)=>run(lowcode.run,...a), | |
| remove:(...a)=>run(lowcode.delete,...a) | |
| }; | |
| } | |