feat(canvas): 画布同步 - 新增操作事务、预演保存与并发恢复能力
This commit is contained in:
@@ -61,8 +61,9 @@ func TestUndoCloudAgentCanvasRestoresLatestMutationAndIsIdempotent(t *testing.T)
|
||||
t.Fatalf("unexpected undo result: %+v", result)
|
||||
}
|
||||
restored, _ := s.repo.CanvasProjectForUser("user", "agent-canvas")
|
||||
if restored.PayloadJSON != canvas.PayloadJSON {
|
||||
t.Fatal("undo did not restore the exact before snapshot")
|
||||
restoredDoc, err := creationDocument(restored.PayloadJSON)
|
||||
if err != nil || cloudAgentCanvasHash(restoredDoc) != beforeHash {
|
||||
t.Fatal("undo did not restore the semantic before snapshot")
|
||||
}
|
||||
result, err = s.UndoCloudAgentCanvas("user", run.ID, call.ID, beforeHash, "重复请求")
|
||||
if err != nil || result["accepted"] != true {
|
||||
|
||||
Reference in New Issue
Block a user