fix: 讯飞鉴权HTTP兼容+AI段落紧凑+对话模式JSON降级

- ReportEditor: 讯飞鉴权改用crypto-js HMAC-SHA256,兼容HTTP非安全环境
- defaultContent.ts+ReportEditor: AI区域<p>标签去掉margin-bottom,段落紧密排布
- ReportEditor: 纯对话模式下JSON解析失败时降级为直接文本回复
- ReportEditor: 对话模式systemPrompt强化JSON格式约束
- deps: 新增crypto-js用于讯飞鉴权
This commit is contained in:
2026-04-20 01:18:57 +08:00
parent ea789cee26
commit d235ced187
4 changed files with 33 additions and 10 deletions

14
package-lock.json generated
View File

@@ -10,7 +10,9 @@
"dependencies": {
"@google/genai": "^1.29.0",
"@tailwindcss/vite": "^4.1.14",
"@types/crypto-js": "^4.2.2",
"@vitejs/plugin-react": "^5.0.4",
"crypto-js": "^4.2.0",
"diff": "^9.0.0",
"dotenv": "^17.2.3",
"express": "^4.21.2",
@@ -1492,6 +1494,12 @@
"@types/node": "*"
}
},
"node_modules/@types/crypto-js": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.2.tgz",
"integrity": "sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==",
"license": "MIT"
},
"node_modules/@types/estree": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
@@ -1904,6 +1912,12 @@
"integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
"license": "MIT"
},
"node_modules/crypto-js": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==",
"license": "MIT"
},
"node_modules/data-uri-to-buffer": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",