请在交互embedding中的validate函数支持异步方法
Describe the feature you'd like to request
embedding中的validate函数通过返回true或false决定节点能否被组合,但假如判断需要执行异步函数则无法实现,希望validate函数能支持异步方法。
Describe the solution you'd like
处理validate函数返回的promise对象
Describe alternatives you've considered
同时兼容同步和异步函数
Your Example Website or App
No response
Screenshots or Videos
No response
👋 @zenkiray
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
validate 函数支持异步可能也不好满足你的需求,目前 validate 的触发时机是在每次移动都会触发,判断是否能够嵌入,如果是异步的话每次都有延迟不适合
可能更适合的解决方案是在嵌入后来判断是否合法,然后再给提示或者取消嵌入,感觉会好些
后续有疑问欢迎再打开issue进行讨论