Skip to content

Commit a0d46ca

Browse files
committed
Activate extension app when prompt to code is activated
1 parent ebce401 commit a0d46ca

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Core/Sources/SuggestionWidget/FeatureReducers/WidgetFeature.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,17 @@ public struct WidgetFeature: ReducerProtocol {
196196
Scope(state: \.panelState, action: /Action.panel) {
197197
PanelFeature()
198198
}
199+
200+
Reduce { state, action in
201+
switch action {
202+
case .panel(.sharedPanel(.promptToCodeGroup(.activateOrCreatePromptToCode))):
203+
return .run { send in
204+
await send(.updateKeyWindow(.sharedPanel))
205+
activateThisApp()
206+
}
207+
default: return .none
208+
}
209+
}
199210

200211
Scope(state: \.chatPanelState, action: /Action.chatPanel) {
201212
ChatPanelFeature()

0 commit comments

Comments
 (0)