feat: 插件开关对其内容函数生效

This commit is contained in:
RockChinQ
2023-07-29 17:10:47 +08:00
parent 833d29b101
commit 96e474a555
3 changed files with 29 additions and 40 deletions

View File

@@ -14,7 +14,15 @@ def get_func_schema_list() -> list:
if not host.__enable_content_functions__:
return []
schemas = host.__callable_functions__
schemas = []
for func in host.__callable_functions__:
if func['enabled']:
fun_cp = func.copy()
del fun_cp['enabled']
schemas.append(fun_cp)
return schemas