mirror of
https://github.com/wu736139669/hapi.git
synced 2026-10-08 19:19:42 +00:00
Add viewport-driven paging with layout acknowledgements, bounded retries, cancellation gates, and epoch-safe history retention. Preserve transcript anchors and expansion state, fix tool-group identity collisions, and serialize Android history coordination on Main. Reduce per-scroll composition and layout work; add native regression tests, CI coverage, and profiling guidance.
14 lines
448 B
Swift
14 lines
448 B
Swift
import Foundation
|
|
|
|
/// Synchronously invalidated by reader input; checked inside the window
|
|
/// actor's before-apply callback. Never reaches back into UI from that actor.
|
|
public final class ChatHistoryRequestGate: @unchecked Sendable {
|
|
private let lock = NSLock()
|
|
private var valid = true
|
|
|
|
public init() {}
|
|
|
|
public var allowsApply: Bool { lock.withLock { valid } }
|
|
public func invalidate() { lock.withLock { valid = false } }
|
|
}
|