feat: 新增报告协作页,并强化 Deep Research 运行诊断与报告兜底

支持浏览器侧素材快照撰写、拒绝报告读时修复、Mermaid PNG 导出与 Word 导出加固。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
董宏凯andCursor committed 2026-09-03 11:16:50 +08:00
1 parent 65d6b61d5d
commit f109a95535
65 files changed
+10342 -245

No files matched your search

@@ -10,6 +10,7 @@
import { apiFetch } from "@/core/api/fetch-client";
import { getBackendBaseURL } from "@/core/config";
import { OptType, writeYLog } from "@/core/log/y-log";
import { replaceMermaidFencesForWordExport } from "@/core/utils/mermaid";
const DOCX_MEDIA_TYPE =
"application/vnd.openxmlformats-officedocument.wordprocessingml.document";
@@ -38,13 +39,15 @@ export async function markdownToDocxBlob(
const source = markdown?.trim();
if (!source) throw new Error("文档内容为空");
const prepared = await replaceMermaidFencesForWordExport(source);
const endpoint = `${getBackendBaseURL()}/api/writing/export/docx`;
const response = await apiFetch(endpoint, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
title: title?.trim() || undefined,
markdown: source,
markdown: prepared.markdown,
embedded_images: prepared.embeddedImages,
}),
});
if (!response.ok) throw await responseError(response);