@@ -28,14 +28,15 @@ import {SuggestionDialogComponent} from "@edition/function/components/suggestion
2828import { useHotkeys } from "react-hotkeys-hook" ;
2929import { useSelectedFunctionNode } from "@edition/function/hooks/FunctionNode.selected.hook" ;
3030import { useFunctionSuggestions } from "@edition/function/hooks/Function.suggestion.hook" ;
31- import { IconArrowBigUp , IconBackspace , IconLetterA , IconLetterQ } from "@tabler/icons-react" ;
31+ import { IconArrowBigUp , IconBackspace , IconLetterA , IconLetterQ , IconLetterX } from "@tabler/icons-react" ;
3232import { HoverCard , HoverCardContent , HoverCardPortal , HoverCardTrigger } from "@radix-ui/react-hover-card" ;
3333import 'ldrs/react/ChaoticOrbit.css'
3434import { AIChatComponent } from "@edition/ai/components/AIChatComponent" ;
3535import { mapAiGenerationFlowToFlowInput } from "@edition/ai/util/AI.flow.mapper" ;
3636import { addIslandSuccessNotification } from "@code0-tech/pictor/dist/components/island/Island.hook" ;
3737import { useFlowCompareStore } from "@edition/flow/hooks/Flow.compare.hook" ;
3838import { FlowView } from "@edition/flow/services/Flow.view" ;
39+ import { FlowExecuteDialogComponent } from "@edition/flow/components/FlowExecuteDialogComponent" ;
3940
4041export interface FlowPanelControlComponentProps {
4142 namespaceId : Namespace [ 'id' ]
@@ -130,6 +131,7 @@ export const FlowPanelControlComponent: React.FC<FlowPanelControlComponentProps>
130131 } , [ flowId , flowService , flowStore , selectedNode ] )
131132
132133 const [ aiOpen , setAiOpen ] = React . useState ( false )
134+ const [ executeDialogOpen , setExecuteDialogOpen ] = React . useState ( false )
133135
134136 useHotkeys ( 'shift+a' , ( keyboardEvent ) => {
135137 if ( selectedNode && ! selectedNode . data . functionId ) setSuggestionDialogOpen ( true )
@@ -151,6 +153,12 @@ export const FlowPanelControlComponent: React.FC<FlowPanelControlComponentProps>
151153 keyboardEvent . preventDefault ( )
152154 } , [ ] )
153155
156+ useHotkeys ( 'shift+x' , ( keyboardEvent ) => {
157+ setExecuteDialogOpen ( prevState => ! prevState )
158+ keyboardEvent . stopPropagation ( )
159+ keyboardEvent . preventDefault ( )
160+ } , [ ] )
161+
154162 return < HoverCard open = { aiOpen } >
155163 < HoverCardTrigger asChild >
156164 < Panel position = { "bottom-center" } data-qa-selector = { "flow-builder-control-panel" } >
@@ -169,7 +177,7 @@ export const FlowPanelControlComponent: React.FC<FlowPanelControlComponentProps>
169177 paddingSize = { "xxs" }
170178 variant = { "none" }
171179 color = { "error" } >
172- < Text > Delete current node</ Text >
180+ < Text > Delete node</ Text >
173181 < Badge color = { "tertiary" } >
174182 < IconBackspace size = { 11 } />
175183 </ Badge >
@@ -192,7 +200,7 @@ export const FlowPanelControlComponent: React.FC<FlowPanelControlComponentProps>
192200 } }
193201 color = { "tertiary" } >
194202 < Text display = { "flex" } align = { "center" } style = { { gap : "0.35rem" } } >
195- Add next node
203+ Add node
196204 < Badge color = { "tertiary" } >
197205 < IconArrowBigUp size = { 10 } />
198206 +
@@ -217,8 +225,26 @@ export const FlowPanelControlComponent: React.FC<FlowPanelControlComponentProps>
217225 < IconLetterQ size = { 10 } />
218226 </ Badge >
219227 </ Button >
228+ < Button data-qa-selector = { "flow-builder-control-panel-execute" }
229+ paddingSize = { "xxs" }
230+ variant = { "none" }
231+ color = { "tertiary" }
232+ onClick = { ( ) => setExecuteDialogOpen ( true ) } >
233+ Execute
234+ < Badge color = { "tertiary" } >
235+ < IconArrowBigUp size = { 10 } />
236+ +
237+ < IconLetterX size = { 10 } />
238+ </ Badge >
239+ </ Button >
220240 </ ButtonGroup >
221241
242+ < FlowExecuteDialogComponent flowId = { flowId }
243+ namespaceId = { namespaceId }
244+ projectId = { projectId }
245+ open = { executeDialogOpen }
246+ onOpenChange = { setExecuteDialogOpen } />
247+
222248
223249 </ Panel >
224250 </ HoverCardTrigger >
0 commit comments