Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,14 @@ public sealed record SessionChatSummary
/// chat is not archived.</summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Archived { get; init; }

/// <summary>Aggregate summary of file changes associated with this chat.
///
/// Servers may populate this so session lists can show per-chat change
/// counts without subscribing to the session or chat channel. Updates travel
/// with the rest of the catalog in `root/sessionSummaryChanged`.</summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ChangesSummary? Changes { get; init; }
}

/// <summary>Aggregate counts describing the file changes associated with a session or
Expand Down
6 changes: 6 additions & 0 deletions clients/go/ahptypes/state.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,12 @@ type SessionChatSummary struct {
// lists without subscribing to the session channel. Absence means the
// chat is not archived.
Archived *bool `json:"archived,omitempty"`
// Aggregate summary of file changes associated with this chat.
//
// Servers may populate this so session lists can show per-chat change
// counts without subscribing to the session or chat channel. Updates travel
// with the rest of the catalog in `root/sessionSummaryChanged`.
Changes *ChangesSummary `json:"changes,omitempty"`
}

// Aggregate counts describing the file changes associated with a session or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,15 @@ data class SessionChatSummary(
* lists without subscribing to the session channel. Absence means the
* chat is not archived.
*/
val archived: Boolean? = null
val archived: Boolean? = null,
/**
* Aggregate summary of file changes associated with this chat.
*
* Servers may populate this so session lists can show per-chat change
* counts without subscribing to the session or chat channel. Updates travel
* with the rest of the catalog in `root/sessionSummaryChanged`.
*/
val changes: ChangesSummary? = null
)

@Serializable
Expand Down
7 changes: 7 additions & 0 deletions clients/rust/crates/ahp-types/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2470,6 +2470,13 @@ pub struct SessionChatSummary {
/// chat is not archived.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub archived: Option<bool>,
/// Aggregate summary of file changes associated with this chat.
///
/// Servers may populate this so session lists can show per-chat change
/// counts without subscribing to the session or chat channel. Updates travel
/// with the rest of the catalog in `root/sessionSummaryChanged`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub changes: Option<ChangesSummary>,
}

/// Aggregate counts describing the file changes associated with a session or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2297,19 +2297,27 @@ public struct SessionChatSummary: Codable, Sendable {
/// lists without subscribing to the session channel. Absence means the
/// chat is not archived.
public var archived: Bool?
/// Aggregate summary of file changes associated with this chat.
///
/// Servers may populate this so session lists can show per-chat change
/// counts without subscribing to the session or chat channel. Updates travel
/// with the rest of the catalog in `root/sessionSummaryChanged`.
public var changes: ChangesSummary?

public init(
resource: String,
title: String,
origin: ChatOrigin? = nil,
interactivity: ChatInteractivity? = nil,
archived: Bool? = nil
archived: Bool? = nil,
changes: ChangesSummary? = nil
) {
self.resource = resource
self.title = title
self.origin = origin
self.interactivity = interactivity
self.archived = archived
self.changes = changes
}
}

Expand Down
4 changes: 4 additions & 0 deletions docs/.changes/20261001-session-chat-summary-changes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "added",
"message": "`SessionChatSummary.changes` exposes per-chat change counts in the lightweight chat catalog without requiring a session subscription."
}
4 changes: 4 additions & 0 deletions schema/actions.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3698,6 +3698,10 @@
"archived": {
"type": "boolean",
"description": "Whether this chat has been archived independently of its owning session\n(see `chat/isArchivedChanged`).\n\nGeneric clients use this to group or filter archived chats in session\nlists without subscribing to the session channel. Absence means the\nchat is not archived."
},
"changes": {
"$ref": "#/$defs/ChangesSummary",
"description": "Aggregate summary of file changes associated with this chat.\n\nServers may populate this so session lists can show per-chat change\ncounts without subscribing to the session or chat channel. Updates travel\nwith the rest of the catalog in `root/sessionSummaryChanged`."
}
},
"required": [
Expand Down
4 changes: 4 additions & 0 deletions schema/commands.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2964,6 +2964,10 @@
"archived": {
"type": "boolean",
"description": "Whether this chat has been archived independently of its owning session\n(see `chat/isArchivedChanged`).\n\nGeneric clients use this to group or filter archived chats in session\nlists without subscribing to the session channel. Absence means the\nchat is not archived."
},
"changes": {
"$ref": "#/$defs/ChangesSummary",
"description": "Aggregate summary of file changes associated with this chat.\n\nServers may populate this so session lists can show per-chat change\ncounts without subscribing to the session or chat channel. Updates travel\nwith the rest of the catalog in `root/sessionSummaryChanged`."
}
},
"required": [
Expand Down
4 changes: 4 additions & 0 deletions schema/errors.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,10 @@
"archived": {
"type": "boolean",
"description": "Whether this chat has been archived independently of its owning session\n(see `chat/isArchivedChanged`).\n\nGeneric clients use this to group or filter archived chats in session\nlists without subscribing to the session channel. Absence means the\nchat is not archived."
},
"changes": {
"$ref": "#/$defs/ChangesSummary",
"description": "Aggregate summary of file changes associated with this chat.\n\nServers may populate this so session lists can show per-chat change\ncounts without subscribing to the session or chat channel. Updates travel\nwith the rest of the catalog in `root/sessionSummaryChanged`."
}
},
"required": [
Expand Down
4 changes: 4 additions & 0 deletions schema/notifications.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,10 @@
"archived": {
"type": "boolean",
"description": "Whether this chat has been archived independently of its owning session\n(see `chat/isArchivedChanged`).\n\nGeneric clients use this to group or filter archived chats in session\nlists without subscribing to the session channel. Absence means the\nchat is not archived."
},
"changes": {
"$ref": "#/$defs/ChangesSummary",
"description": "Aggregate summary of file changes associated with this chat.\n\nServers may populate this so session lists can show per-chat change\ncounts without subscribing to the session or chat channel. Updates travel\nwith the rest of the catalog in `root/sessionSummaryChanged`."
}
},
"required": [
Expand Down
4 changes: 4 additions & 0 deletions schema/state.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,10 @@
"archived": {
"type": "boolean",
"description": "Whether this chat has been archived independently of its owning session\n(see `chat/isArchivedChanged`).\n\nGeneric clients use this to group or filter archived chats in session\nlists without subscribing to the session channel. Absence means the\nchat is not archived."
},
"changes": {
"$ref": "#/$defs/ChangesSummary",
"description": "Aggregate summary of file changes associated with this chat.\n\nServers may populate this so session lists can show per-chat change\ncounts without subscribing to the session or chat channel. Updates travel\nwith the rest of the catalog in `root/sessionSummaryChanged`."
}
},
"required": [
Expand Down
8 changes: 8 additions & 0 deletions types/channels-session/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,14 @@ export interface SessionChatSummary {
* chat is not archived.
*/
archived?: boolean;
/**
* Aggregate summary of file changes associated with this chat.
*
* Servers may populate this so session lists can show per-chat change
* counts without subscribing to the session or chat channel. Updates travel
* with the rest of the catalog in `root/sessionSummaryChanged`.
*/
changes?: ChangesSummary;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "session-chat-summary-changes-round-trip",
"group": "A",
"description": "SessionSummary chat catalog entries preserve optional per-chat change counts so list clients can render them without subscribing to the session or chat channel.",
"type": "SessionSummary",
"input": {
"resource": "ahp-session:/s1",
"provider": "demo",
"title": "Agent team",
"status": 1,
"createdAt": "2024-01-01T00:00:00.001Z",
"modifiedAt": "2024-01-01T00:00:00.002Z",
"changes": {
"additions": 15,
"deletions": 4,
"files": 3
},
"chats": [
{
"resource": "ahp-chat:/lead",
"title": "Lead"
},
{
"resource": "ahp-chat:/worker",
"title": "Worker",
"changes": {
"additions": 12,
"deletions": 3,
"files": 2
}
}
],
"defaultChat": "ahp-chat:/lead"
},
"acceptableOutputs": [
{
"resource": "ahp-session:/s1",
"provider": "demo",
"title": "Agent team",
"status": 1,
"createdAt": "2024-01-01T00:00:00.001Z",
"modifiedAt": "2024-01-01T00:00:00.002Z",
"changes": {
"additions": 15,
"deletions": 4,
"files": 3
},
"chats": [
{
"resource": "ahp-chat:/lead",
"title": "Lead"
},
{
"resource": "ahp-chat:/worker",
"title": "Worker",
"changes": {
"additions": 12,
"deletions": 3,
"files": 2
}
}
],
"defaultChat": "ahp-chat:/lead"
}
]
}
Loading