mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 21:48:37 +00:00
refactor(macos): dedupe UI, pairing, and runtime helpers
This commit is contained in:
@@ -113,17 +113,15 @@ final class WorkActivityStore {
|
||||
|
||||
private func setJobActive(_ activity: Activity) {
|
||||
self.jobs[activity.sessionKey] = activity
|
||||
// Main session preempts immediately.
|
||||
if activity.role == .main {
|
||||
self.currentSessionKey = activity.sessionKey
|
||||
} else if self.currentSessionKey == nil || !self.isActive(sessionKey: self.currentSessionKey!) {
|
||||
self.currentSessionKey = activity.sessionKey
|
||||
}
|
||||
self.refreshDerivedState()
|
||||
self.updateCurrentSession(with: activity)
|
||||
}
|
||||
|
||||
private func setToolActive(_ activity: Activity) {
|
||||
self.tools[activity.sessionKey] = activity
|
||||
self.updateCurrentSession(with: activity)
|
||||
}
|
||||
|
||||
private func updateCurrentSession(with activity: Activity) {
|
||||
// Main session preempts immediately.
|
||||
if activity.role == .main {
|
||||
self.currentSessionKey = activity.sessionKey
|
||||
|
||||
Reference in New Issue
Block a user