feat(goto-anything): add RAG pipeline node search (#25948)

This commit is contained in:
GuanMu 2025-09-19 18:28:13 +08:00 • committed by GitHub
commit ab910c736c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 270 additions and 30 deletions

View file

@ -0,0 +1,24 @@
import type { ActionItem } from './types'
// Create the RAG pipeline nodes action
export const ragPipelineNodesAction: ActionItem = {
key: '@node',
shortcut: '@node',
title: 'Search RAG Pipeline Nodes',
description: 'Find and jump to nodes in the current RAG pipeline by name or type',
searchFn: undefined, // Will be set by useRagPipelineSearch hook
search: async (_, searchTerm = '', _locale) => {
try {
// Use the searchFn if available (set by useRagPipelineSearch hook)
if (ragPipelineNodesAction.searchFn)
return ragPipelineNodesAction.searchFn(searchTerm)
// If not in RAG pipeline context, return empty array
return []
}
catch (error) {
console.warn('RAG pipeline nodes search failed:', error)
return []
}
},
}