File tree Expand file tree Collapse file tree
Core/Sources/SuggestionWidget/SuggestionPanelContent Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,28 +304,11 @@ extension PromptToCodePanelView {
304304 . padding ( . trailing, 4 )
305305 }
306306 . buttonStyle ( TheButtonStyle ( ) )
307- . keyboardShortcut ( KeyEquivalent . return, modifiers: [ . command] )
308- . background {
309- Button ( action: {
310- switch (
311- modifierFlags. contains ( . option) ,
312- defaultModeIsContinuous
313- ) {
314- case ( true , true ) :
315- store. send ( . acceptAndContinueButtonTapped)
316- case ( false , true ) :
317- store. send ( . acceptButtonTapped)
318- case ( true , false ) :
319- store. send ( . acceptButtonTapped)
320- case ( false , false ) :
321- store. send ( . acceptAndContinueButtonTapped)
322- }
323- } ) {
324- EmptyView ( )
325- }
326- . buttonStyle ( . plain)
327- . keyboardShortcut ( KeyEquivalent . return, modifiers: [ . command, . option] )
328- }
307+ . keyboardShortcut (
308+ KeyEquivalent . return,
309+ modifiers: modifierFlags
310+ . contains ( . option) ? [ . command, . option] : [ . command]
311+ )
329312
330313 Divider ( )
331314
@@ -465,7 +448,7 @@ extension PromptToCodePanelView {
465448 DescriptionContent ( store: store, codeForegroundColor: codeForegroundColor)
466449 CodeContent (
467450 store: store,
468- language: language,
451+ language: language,
469452 isGenerating: isGenerating,
470453 codeForegroundColor: codeForegroundColor
471454 )
You can’t perform that action at this time.
0 commit comments