Fix diff comment payload integration
This commit is contained in:
@@ -15,7 +15,7 @@ public struct DiffCommentPayload {
|
||||
self.formatter = formatter
|
||||
}
|
||||
|
||||
/// Serializes one comment.
|
||||
/// Serializes one comment, including optional lifecycle state.
|
||||
public func json(_ comment: DiffComment) -> [String: Any] {
|
||||
var json: [String: Any] = [
|
||||
"id": comment.id.uuidString,
|
||||
@@ -32,6 +32,9 @@ public struct DiffCommentPayload {
|
||||
if let endSide = comment.endSide {
|
||||
json["endSide"] = endSide
|
||||
}
|
||||
if let consumedAt = comment.consumedAt {
|
||||
json["consumedAt"] = formatter.string(from: consumedAt)
|
||||
}
|
||||
return json
|
||||
}
|
||||
|
||||
@@ -46,11 +49,7 @@ public struct DiffCommentPayload {
|
||||
var listed: [[String: Any]] = []
|
||||
listed.reserveCapacity(comments.count)
|
||||
for comment in comments where includeConsumed || comment.consumedAt == nil {
|
||||
var entry = json(comment)
|
||||
if let consumedAt = comment.consumedAt {
|
||||
entry["consumedAt"] = formatter.string(from: consumedAt)
|
||||
}
|
||||
listed.append(entry)
|
||||
listed.append(json(comment))
|
||||
}
|
||||
return [
|
||||
"repo_root": repoRoot,
|
||||
|
||||
@@ -727,6 +727,7 @@ C0DE71B10000000000000001 /* AppDelegate+AgentChatNotifications.swift in Sources
|
||||
CC0DE00000000000000000A4 /* CmuxCore in Frameworks */ = {isa = PBXBuildFile; productRef = CC0DE00000000000000000A2 /* CmuxCore */; };
|
||||
A500D015A1B2C3D4E5F60718 /* CMUXDebugLog in Frameworks */ = {isa = PBXBuildFile; productRef = A500D013A1B2C3D4E5F60718 /* CMUXDebugLog */; };
|
||||
CC0033E15A1B2C3D4E5F0012 /* CmuxDiffComments in Frameworks */ = {isa = PBXBuildFile; productRef = CC0033E15A1B2C3D4E5F0011 /* CmuxDiffComments */; };
|
||||
CC0033E15A1B2C3D4E5F0013 /* CmuxDiffComments in Frameworks */ = {isa = PBXBuildFile; productRef = CC0033E15A1B2C3D4E5F0011 /* CmuxDiffComments */; };
|
||||
D1320AA0D1320AA0D1320AA2 /* CmuxDockTilePlugin.plugin in Copy Dock Tile Plugin */ = {isa = PBXBuildFile; fileRef = D1320AA0D1320AA0D1320AA5 /* CmuxDockTilePlugin.plugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
C54860040000000000000001 /* CmuxDurableDeepLinkRestoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C54860040000000000000002 /* CmuxDurableDeepLinkRestoreTests.swift */; };
|
||||
E7E000000000000000000005 /* CmuxEventBus.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7E000000000000000000006 /* CmuxEventBus.swift */; };
|
||||
@@ -5222,6 +5223,7 @@ C0DE71B10000000000000002 /* AppDelegate+AgentChatNotifications.swift */ = {isa =
|
||||
5E55500000000000000000E3 /* CmuxCommandPalette in Frameworks */,
|
||||
C750100000000000000000A3 /* CmuxControlSocket in Frameworks */,
|
||||
CC0DE00000000000000000A3 /* CmuxCore in Frameworks */,
|
||||
CC0033E15A1B2C3D4E5F0013 /* CmuxDiffComments in Frameworks */,
|
||||
C0DE45000000000000000001 /* CmuxExtensionKit in Frameworks */,
|
||||
C0DE49000000000000000001 /* CmuxExtensionSidebarExamples in Frameworks */,
|
||||
C9A2C00000000000000000C3 /* CmuxFeedback in Frameworks */,
|
||||
|
||||
+3
@@ -132,6 +132,9 @@
|
||||
<FileRef
|
||||
location = "group:CMUXDebugLog">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:CmuxDiffComments">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:CmuxExtensionKit">
|
||||
</FileRef>
|
||||
|
||||
Reference in New Issue
Block a user