You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

workflow-nodes.tsx 758B

123456789101112131415161718192021222324
  1. import type { ActionItem } from './types'
  2. // Create the workflow nodes action
  3. export const workflowNodesAction: ActionItem = {
  4. key: '@node',
  5. shortcut: '@node',
  6. title: 'Search Workflow Nodes',
  7. description: 'Find and jump to nodes in the current workflow by name or type',
  8. searchFn: undefined, // Will be set by useWorkflowSearch hook
  9. search: async (_, searchTerm = '', locale) => {
  10. try {
  11. // Use the searchFn if available (set by useWorkflowSearch hook)
  12. if (workflowNodesAction.searchFn)
  13. return workflowNodesAction.searchFn(searchTerm)
  14. // If not in workflow context, return empty array
  15. return []
  16. }
  17. catch (error) {
  18. console.warn('Workflow nodes search failed:', error)
  19. return []
  20. }
  21. },
  22. }