File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
app/workspace/[workspaceId]/w/[workflowId]/components/control-bar/components/export-controls Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,15 @@ export function ExportControls({ disabled = false }: ExportControlsProps) {
3737 }
3838 }
3939
40- const handleExportYaml = ( ) => {
40+ const handleExportYaml = async ( ) => {
4141 if ( ! currentWorkflow || ! activeWorkflowId ) {
4242 logger . warn ( 'No active workflow to export' )
4343 return
4444 }
4545
4646 setIsExporting ( true )
4747 try {
48- const yamlContent = getYaml ( )
48+ const yamlContent = await getYaml ( )
4949 const filename = `${ currentWorkflow . name . replace ( / [ ^ a - z 0 - 9 ] / gi, '-' ) } .yaml`
5050
5151 downloadFile ( yamlContent , filename , 'text/yaml' )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ interface WorkflowYamlState {
1313
1414interface WorkflowYamlActions {
1515 generateYaml : ( ) => Promise < void >
16- getYaml : ( ) => string
16+ getYaml : ( ) => Promise < string >
1717 refreshYaml : ( ) => void
1818}
1919
@@ -151,7 +151,7 @@ export const useWorkflowYamlStore = create<WorkflowYamlStore>()(
151151 }
152152 } ,
153153
154- getYaml : ( ) => {
154+ getYaml : async ( ) => {
155155 // Initialize subscriptions on first use
156156 initializeSubscriptions ( )
157157
@@ -160,7 +160,7 @@ export const useWorkflowYamlStore = create<WorkflowYamlStore>()(
160160
161161 // Auto-refresh if data is stale (older than 1 second) or never generated
162162 if ( ! lastGenerated || currentTime - lastGenerated > 1000 ) {
163- get ( ) . generateYaml ( )
163+ await get ( ) . generateYaml ( )
164164 return get ( ) . yaml
165165 }
166166
You can’t perform that action at this time.
0 commit comments