MCPcopy Create free account
hub / github.com/altic-dev/FluidVoice / configureNotchCallbacks

Method configureNotchCallbacks

Sources/Fluid/ContentView.swift:625–654  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

handleContentAppearMethod · 0.95

Calls 5

createNewChatMethod · 0.45
switchToChatMethod · 0.45
deleteCurrentChatMethod · 0.45

Tested by

no test coverage detected