feat: 增强规则资产管理与审计页面运行时调试
后端新增规则资产版本管理和规则文件 CRUD 接口,优化风险 规则生成模板执行和员工数据模型字段,知识库 RAG 增强本 地回退和文档提取能力,清理旧风险规则文件统一由生成引擎 管理,前端审计页面增加运行时调试面板和规则资产编辑交互, 补充单元测试覆盖。
This commit is contained in:
24
fix_init.py
Normal file
24
fix_init.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import re
|
||||
|
||||
file_path = 'server/src/app/models/__init__.py'
|
||||
with open(file_path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
# Add imports
|
||||
imports_to_add = "from app.models.hermes_config import HermesTaskConfig, HermesTaskExecutionLog\nfrom app.models.hermes_report import HermesRiskReport\n"
|
||||
content = re.sub(
|
||||
r'(from app\.models\.organization import OrganizationUnit)',
|
||||
imports_to_add + r'\1',
|
||||
content
|
||||
)
|
||||
|
||||
# Add to __all__
|
||||
content = re.sub(
|
||||
r'(\s*"OrganizationUnit",)',
|
||||
r'\n "HermesTaskConfig",\n "HermesTaskExecutionLog",\n "HermesRiskReport",\1',
|
||||
content
|
||||
)
|
||||
|
||||
with open(file_path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('Done.')
|
||||
Reference in New Issue
Block a user