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.

rag-pipeline-nodes.tsx 794B

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