Refresh AI region list after editor content loads

- Extract AI region scanning into a reusable utility with unit coverage.

- Refresh AI region dropdown state after drafts, reports, default templates, and selected templates write HTML into the editor.

- Keep the existing MutationObserver path for later DOM edits and inserted AI regions.

- Add E2E coverage for existing template AI regions appearing on initial report editor load.

- Update README, AGENTS, report editor, progress, and testing docs for AI region synchronization behavior.
This commit is contained in:
2026-05-02 04:57:00 +08:00
parent 558498a4bb
commit 3774657ef5
9 changed files with 83 additions and 29 deletions

View File

@@ -351,6 +351,7 @@ PostgreSQL 数据模型。当前覆盖 `Tenant`、`Department`、`User`、`UserS
- 后端模板 DTO 和权限资源映射
- 模板列表合并工具,防止新增模板被旧 `localStorage.templates` 覆盖
- 模板导入导出工具,覆盖 HTML 模板包生成、字段库元数据回导和旧 JSON 导入兼容
- AI 区域扫描工具,覆盖从报告正文 HTML 识别 `.ai-region`
- 后端用户 DTO 和部门模板授权映射
- 后端系统设置 schema 校验
- 后端 AI 入参和讯飞语音代理帧处理