mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-18 19:44:21 +00:00
feat: 引入 vjsf 渲染表单
This commit is contained in:
@@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
from .. import stage, app
|
||||
from ..bootutils import config
|
||||
from ...config import settings as settings_mgr
|
||||
from ...utils import schema
|
||||
|
||||
|
||||
@stage.stage_class("LoadConfigStage")
|
||||
@@ -50,7 +51,8 @@ class LoadConfigStage(stage.BootingStage):
|
||||
ap.settings_mgr.register_manager(
|
||||
name="system.json",
|
||||
description="系统配置",
|
||||
manager=ap.system_cfg
|
||||
manager=ap.system_cfg,
|
||||
schema=schema.CONFIG_SYSTEM_SCHEMA
|
||||
)
|
||||
|
||||
ap.plugin_setting_meta = await config.load_json_config("plugins/plugins.json", "templates/plugin-settings.json")
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import os
|
||||
import json
|
||||
|
||||
|
||||
def load_schema(schema_path: str) -> dict:
|
||||
with open(schema_path, 'r', encoding='utf-8') as f:
|
||||
return json.load(f)
|
||||
|
||||
|
||||
CONFIG_SYSTEM_SCHEMA = load_schema("templates/schema/system.json")
|
||||
Reference in New Issue
Block a user