Session Order Adjustment
Nucleic-Session: 19C20841-87D4-45F9-A5AD-EBB92B735F82 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -1242,6 +1242,13 @@ extension DashboardSnapshot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension WireSessionSummary {
|
extension WireSessionSummary {
|
||||||
|
/// Recency key for ordering session lists: the last *user* message, falling back to `updatedAt`
|
||||||
|
/// for sessions with no user message yet (or summaries from a host that predates the field).
|
||||||
|
/// Ordering on this keeps a chat's position steady until the user speaks again, rather than
|
||||||
|
/// reshuffling the list on every bit of agent activity (which bumps `updatedAt` every few
|
||||||
|
/// seconds). Mirrors the Mac sidebar's last-turn ordering.
|
||||||
|
var lastTurnAt: Date { lastUserMessageAt ?? updatedAt }
|
||||||
|
|
||||||
/// A copy with selected fields overridden — the demo simulator's only way to "mutate" a
|
/// A copy with selected fields overridden — the demo simulator's only way to "mutate" a
|
||||||
/// summary, whose stored properties are all `let`. Nullable fields use a double optional so a
|
/// summary, whose stored properties are all `let`. Nullable fields use a double optional so a
|
||||||
/// caller can distinguish "keep" (omit) from "set to nil" (`.some(nil)`). `updatedAt` bumps
|
/// caller can distinguish "keep" (omit) from "set to nil" (`.some(nil)`). `updatedAt` bumps
|
||||||
|
|||||||
Reference in New Issue
Block a user