Pick a file in Files to edit it here.
310 };
311 }
312 +
313 + private static ProjectDetail ParseDetail(string json)
314 + {
315 + if (string.IsNullOrWhiteSpace(json)) return new ProjectDetail();
316 + var i = json.IndexOf('{');
317 + if (i < 0) return new ProjectDetail();
318 + using var doc = JsonDocument.Parse(json[i..]);
319 + var r = doc.RootElement;
320 + if (r.ValueKind != JsonValueKind.Object) return new ProjectDetail();
321 + string S(JsonElement e, string k) => e.TryGetProperty(k, out var v)
322 + ? (v.ValueKind == JsonValueKind.Number ? v.ToString() : v.GetString() ?? "") : "";
323 + int I(string k) => r.TryGetProperty(k, out var v) && v.ValueKind == JsonValueKind.Number ? v.GetInt32() : 0;
324 + var d = new ProjectDetail { Project = S(r, "Project"), Verdict = S(r, "Verdict"), Matched = I("Matched"), Differ = I("Differ
+"), OnlyLocal = I("OnlyLocal"), OnlyBox = I("OnlyBox") };
325 + if (r.TryGetProperty("Files", out var files) && files.ValueKind == JsonValueKind.Array)
326 + foreach (var f in files.EnumerateArray())
327 + if (f.ValueKind == JsonValueKind.Object)
328 + d.Files.Add(new FileRow { Status = S(f, "Status"), Path = S(f, "Path"), LocalSize = S(f, "LocalSize"), BoxSize =
+ S(f, "BoxSize"), LocalHash = S(f, "LocalHash"), BoxHash = S(f, "BoxHash") });
329 + return d;
330 + }
331 }
✽ Symbioting… (9m 22s · ↓ 41.5k tokens · almost done thinking with max effort)
⎿ Tip: Use /btw to ask a quick side question without interrupting Claude's current work
❯
⏵⏵ bypass permissions on (shift+tab to cycle) · esc to interrupt · ← for agents