chore(sync): 上游同步 - 快照导入 upstream/main@e70fe1b9(v1.6.5)并重放本项目差异

This commit is contained in:
tongtong committed 2026-10-12 11:52:01 +08:00
1 parent c9979a4a2b
commit 43c3dd3568
167 files changed
+5792 -7802

No files matched your search

@@ -58,8 +58,19 @@ func cloudAgentNodeSnapshotMatches(doc map[string]any, nodeID, snapshotHash stri
func cloudAgentCanvasHash(doc map[string]any) string {
content := make(map[string]any, len(doc))
for key, value := range doc {
if key != "viewport" && key != "updatedAt" {
content[key] = value
switch key {
case "id", "viewport", "updatedAt", "revision", "createdAt":
continue
case "title", "projectId":
if text, ok := value.(string); ok && strings.TrimSpace(text) == "" {
continue
}
}
content[key] = value
}
for _, key := range []string{"nodes", "connections"} {
if value, exists := content[key]; !exists || value == nil {
content[key] = []any{}
}
}
return creationHash(content)