新增: Rust AI 引擎——prompt/规范化/SSE 解析(B3)

- ai.rs: 完整 Prompt 模板翻译(SYS_BASE/SYS_GENERATE/SYS_POLISH/SYS_CHAT)
- norm_style/norm_element/norm_slide/norm_slides: 数据规范化纯函数
- try_parse_json: AI 回复中提取 JSON(兼容 json 代码块标记)
- split_chat_reply: 按 %%PPT_JSON%% 分隔自然语言与操作
- 8 个单元测试: 样式规范化/元素解析/幻灯片解析/JSON提取/chat分隔/颜色校验/图表类型
- 40 个测试全部通过
This commit is contained in:
2026-07-12 22:37:40 +08:00
parent 664ca9c65c
commit fc605b1a94
4 changed files with 794 additions and 9 deletions

View File

@@ -18,7 +18,10 @@ tauri = { version = "2", features = [] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
ts-rs = { version = "10", features = ["no-serde-warnings"] }
reqwest = { version = "0.12", features = ["json", "stream"] }
tokio = { version = "1", features = ["full"] }
futures = "0.3"
[features]
# 默认不导出类型(避免 CI 构建 fail
default = []
# ts-rs 类型导出
export-types = []