fix: 岗位会商历史按用户隔离,并为 write-file 预览启用 AI 写作视图
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
8c3d6a02fc
commit
8ce3a62826
5 files changed
+67
-38
No files matched your search
@@ -99,7 +99,8 @@ class NodeResponse(BaseModel):
|
||||
class SessionResponse(BaseModel):
|
||||
id: str
|
||||
# Older personal rows can already contain a mock task id; task_scoped is
|
||||
# the authoritative opt-in marker for cross-user task sharing.
|
||||
# the authoritative marker for task-bound rows. History is partitioned by
|
||||
# user, so it only controls snapshot-id locking and list bucketing now.
|
||||
external_task_id: str | None = None
|
||||
task_scoped: bool = False
|
||||
task_snapshot: dict[str, Any] = Field(default_factory=dict)
|
||||
@@ -248,7 +249,7 @@ def _task_snapshot_for_scope(
|
||||
*,
|
||||
task_scoped: bool = True,
|
||||
) -> dict[str, Any]:
|
||||
"""Lock the snapshot id only for an explicit shared task scope."""
|
||||
"""Lock the snapshot id only for an explicit task-bound scope."""
|
||||
if not task_scoped or not external_task_id:
|
||||
return dict(task_snapshot)
|
||||
return {**task_snapshot, "id": external_task_id, "externalTaskId": external_task_id}
|
||||
|
||||
Reference in new issue
Block a user