feat: 深度研究支持独立新报告与原文改写,并完善沙箱、模型管理与全文改写
新报告不再覆盖当前文件卡片,写入时打开沙箱;步骤条仅在改写原文时位于卡片上方。同时补齐改写本地回退、模型管理与会商第三步相关改动。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
11f928bc95
commit
a5a9c952e8
63 files changed
+4113
-929
No files matched your search
+10
-2
@@ -54,9 +54,17 @@ class DocumentRewriteVersionRepository:
|
||||
model_name=model_name,
|
||||
)
|
||||
session.add(row)
|
||||
# Do not refresh after commit. In a read/write-splitting MySQL
|
||||
# deployment that read can be routed to a lagging replica even
|
||||
# though the INSERT succeeded on the writer. The caller treats a
|
||||
# version-record failure as a reason to restore the document, so
|
||||
# that replica-only error would otherwise undo a valid rewrite.
|
||||
# Flush materializes the Python/SQLAlchemy defaults on the writer
|
||||
# and lets us return a complete snapshot without a second query.
|
||||
await session.flush()
|
||||
snapshot = self._row_to_dict(row)
|
||||
await session.commit()
|
||||
await session.refresh(row)
|
||||
return self._row_to_dict(row)
|
||||
return snapshot
|
||||
|
||||
async def get(
|
||||
self,
|
||||
|
||||
Reference in new issue
Block a user