File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ struct ADEApp: App {
2020 . environmentObject ( syncService)
2121 . environmentObject ( dictationController)
2222 . task {
23+ await MainActor . run {
24+ ADEIntentCommandRegistry . register ( ADESyncIntentBridge . shared)
25+ }
2326 guard !didBootstrapSync else { return }
2427 didBootstrapSync = true
2528 lastActivationSyncAt = Date ( )
@@ -62,3 +65,28 @@ struct ADEApp: App {
6265 }
6366 }
6467}
68+
69+ // MARK: - Live Activity / Control Widget command bridge
70+
71+ /// Maps the cross-target intent commands to main-app remote commands.
72+ /// Kept in the main ADE target so widgets never link `SyncService`.
73+ @MainActor
74+ private final class ADESyncIntentBridge : ADEIntentCommandBridge {
75+ static let shared = ADESyncIntentBridge ( )
76+
77+ private init ( ) { }
78+
79+ func dispatch( _ kind: ADEIntentCommandKind , payload: [ String : Any ] ) async {
80+ let mapped : RemoteCommandKind
81+ switch kind {
82+ case . approveSession: mapped = . approveSession
83+ case . denySession: mapped = . denySession
84+ case . pauseSession: mapped = . pauseSession
85+ case . replyToSession: mapped = . replyToSession
86+ case . restartSession: mapped = . restartSession
87+ case . retryPrChecks: mapped = . retryPrChecks
88+ case . openPr: mapped = . openPr
89+ }
90+ await SyncService . shared? . sendRemoteCommand ( mapped, payload: payload)
91+ }
92+ }
Original file line number Diff line number Diff line change @@ -152,6 +152,13 @@ struct WorkNewChatScreen: View {
152152 selectedLaneId == workAutoCreateLaneSentinelId
153153 }
154154
155+ private var autoCreateToolsLane : LaneSummary ? {
156+ if let preferredLaneId, let lane = lanes. first ( where: { $0. id == preferredLaneId } ) {
157+ return lane
158+ }
159+ return lanes. first
160+ }
161+
155162 /// Fast mode only applies to in-app chat sessions on fast-tier models — the
156163 /// CLI launcher has no fast-mode parameter — so the lightning toggle (and the
157164 /// value we send) is gated on both. The picker's option can only *add* support
You can’t perform that action at this time.
0 commit comments