feat: 深度研究支持独立新报告与原文改写,并完善沙箱、模型管理与全文改写

新报告不再覆盖当前文件卡片,写入时打开沙箱;步骤条仅在改写原文时位于卡片上方。同时补齐改写本地回退、模型管理与会商第三步相关改动。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
董宏凯andCursor committed 2026-08-21 21:46:04 +08:00
1 parent 11f928bc95
commit a5a9c952e8
63 files changed
+4113 -929

No files matched your search

@@ -305,31 +305,6 @@ async def langgraph_runtime(app: FastAPI) -> AsyncGenerator[None, None]:
app.state.report_structure_store = make_report_structure_store(sf)
from deerflow.persistence.enterprise_research import (
make_enterprise_research_report_job_store,
make_enterprise_research_task_store,
)
app.state.enterprise_research_task_store = make_enterprise_research_task_store(sf)
app.state.enterprise_research_report_job_store = make_enterprise_research_report_job_store(sf)
# 企业研究报告写作是独立的、冻结计划/证据快照的后台任务;它不复用或改变
# 已有 deep-research 的 Job / dispatcher。
from app.gateway.enterprise_research_report_executor import EnterpriseResearchReportExecutor
app.state.enterprise_research_report_executor = EnterpriseResearchReportExecutor(
app.state.enterprise_research_task_store,
app.state.enterprise_research_report_job_store,
)
async def _recover_enterprise_research_reports() -> None:
try:
await app.state.enterprise_research_report_executor.recover_pending()
except Exception: # noqa: BLE001
logger.warning("[enterprise-research] startup report recovery failed", exc_info=True)
asyncio.create_task(_recover_enterprise_research_reports())
from deerflow.integrations.weknora.runtime import register_llmwiki_store
from deerflow.persistence.llmwiki import make_llmwiki_store