()
| 623 | } |
| 624 | |
| 625 | private func configureNotchCallbacks() { |
| 626 | NotchOverlayManager.shared.onNotchClicked = { |
| 627 | guard NotchOverlayManager.shared.canHandleNotchCommandTap else { return } |
| 628 | if NotchOverlayManager.shared.canShowExpandedCommandOutput, |
| 629 | !NotchContentState.shared.commandConversationHistory.isEmpty |
| 630 | { |
| 631 | NotchOverlayManager.shared.showExpandedCommandOutput() |
| 632 | } |
| 633 | } |
| 634 | |
| 635 | NotchOverlayManager.shared.onCommandFollowUp = { [weak commandModeService] text in |
| 636 | guard NotchOverlayManager.shared.allowsCommandNotchActions else { return } |
| 637 | await commandModeService?.processFollowUpCommand(text) |
| 638 | } |
| 639 | |
| 640 | NotchOverlayManager.shared.onNewChat = { [weak commandModeService] in |
| 641 | guard NotchOverlayManager.shared.allowsCommandNotchActions else { return } |
| 642 | commandModeService?.createNewChat() |
| 643 | } |
| 644 | |
| 645 | NotchOverlayManager.shared.onSwitchChat = { [weak commandModeService] chatID in |
| 646 | guard NotchOverlayManager.shared.allowsCommandNotchActions else { return } |
| 647 | commandModeService?.switchToChat(id: chatID) |
| 648 | } |
| 649 | |
| 650 | NotchOverlayManager.shared.onClearChat = { [weak commandModeService] in |
| 651 | guard NotchOverlayManager.shared.allowsCommandNotchActions else { return } |
| 652 | commandModeService?.deleteCurrentChat() |
| 653 | } |
| 654 | } |
| 655 | |
| 656 | private func loadProviderState() { |
| 657 | self.selectedProviderID = SettingsStore.shared.selectedProviderID |
no test coverage detected