Sessions Integration Feature
Nucleic-Session: FC94353F-9F0D-4BCC-AD7C-0FB14E38C2E5 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -787,16 +787,25 @@ final class RemoteStore: ObservableObject {
|
||||
send(.unsubscribe(target))
|
||||
markOpened(target) // everything up to now has been seen
|
||||
guard openSessionID == target else { return }
|
||||
activeConnection?.openSessionID = nil
|
||||
connection(owningSession: target)?.openSessionID = nil
|
||||
openSessionID = nil
|
||||
openSessionHostID = nil
|
||||
openEvents = []
|
||||
openApprovals = []
|
||||
openDiff = nil
|
||||
diffLoading = false
|
||||
// Context reverts to the aggregate now that no transcript is open.
|
||||
if !demoMode { rebuildAggregate() }
|
||||
}
|
||||
|
||||
func respond(_ approval: ApprovalRequest, _ decision: Decision) {
|
||||
send(.approvalRespond(approval.id, decision))
|
||||
// Route to the Mac that owns the approval's session (the approval message carries no
|
||||
// sessionID of its own). Demo resolves locally.
|
||||
if demoMode {
|
||||
demoHandle(.approvalRespond(approval.id, decision))
|
||||
} else {
|
||||
connection(owningSession: approval.sessionID)?.send(.approvalRespond(approval.id, decision))
|
||||
}
|
||||
openApprovals.removeAll { $0.id == approval.id } // optimistic dismiss; host confirms
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user