File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
SuggestionWidget/FeatureReducers Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public final class Service {
5252 ProService ( )
5353 }
5454 #endif
55-
55+
5656 scheduledCleaner. service = self
5757 }
5858
@@ -83,9 +83,16 @@ final class GlobalShortcutManager {
8383 setupShortcutIfNeeded ( )
8484
8585 KeyboardShortcuts . onKeyUp ( for: . showHideWidget) { [ guiController] in
86- guiController. viewStore. send ( . suggestionWidget( . circularWidget( . widgetClicked) ) )
86+ if XcodeInspector . shared. activeXcode == nil ,
87+ !guiController. viewStore. state. suggestionWidgetState. chatPanelState. isPanelDisplayed,
88+ UserDefaults . shared. value ( for: \. showHideWidgetShortcutGlobally)
89+ {
90+ guiController. viewStore. send ( . openChatPanel( forceDetach: true ) )
91+ } else {
92+ guiController. viewStore. send ( . suggestionWidget( . circularWidget( . widgetClicked) ) )
93+ }
8794 }
88-
95+
8996 XcodeInspector . shared. $activeApplication. sink { app in
9097 if !UserDefaults. shared. value ( for: \. showHideWidgetShortcutGlobally) {
9198 let shouldBeEnabled = if let app, app. isXcode || app. isExtensionService {
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public struct ChatPanelFeature: ReducerProtocol {
4747 public struct State : Equatable {
4848 public var chatTabGroup = ChatTabGroup ( )
4949 var colorScheme : ColorScheme = . light
50- var isPanelDisplayed = false
50+ public internal ( set ) var isPanelDisplayed = false
5151 var chatPanelInASeparateWindow = false
5252 }
5353
You can’t perform that action at this time.
0 commit comments