Session Order Adjustment
Nucleic-Session: 19C20841-87D4-45F9-A5AD-EBB92B735F82 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -281,6 +281,14 @@ enum StatusStyle {
|
|||||||
case .finished, .interrupted, .error: return 5
|
case .finished, .interrupted, .error: return 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The shared session-list sort: attention-first by `sortRank`, then, within a rank, by
|
||||||
|
/// last-turn recency (`lastTurnAt`) rather than raw activity — so rows hold their place
|
||||||
|
/// instead of reshuffling every few seconds as the agent works. Mirrors the Mac sidebar.
|
||||||
|
static func attentionThenRecency(_ lhs: WireSessionSummary, _ rhs: WireSessionSummary) -> Bool {
|
||||||
|
let l = sortRank(lhs), r = sortRank(rhs)
|
||||||
|
return l == r ? lhs.lastTurnAt > rhs.lastTurnAt : l < r
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension SessionStatus {
|
extension SessionStatus {
|
||||||
|
|||||||
Reference in New Issue
Block a user