mirror of
https://github.com/langgenius/dify.git
synced 2026-07-28 23:59:34 +08:00
19 lines
554 B
TypeScript
19 lines
554 B
TypeScript
import type { ActionItem } from './types'
|
|
import { findWorkflowNodes } from '@/app/components/workflow/goto-anything-search'
|
|
|
|
export const workflowNodesAction: ActionItem = {
|
|
key: '@node',
|
|
shortcut: '@node',
|
|
title: 'Search Workflow Nodes',
|
|
description: 'Find and jump to nodes in the current workflow by name or type',
|
|
source: 'local',
|
|
search: (_, searchTerm = '', _locale) => {
|
|
try {
|
|
return findWorkflowNodes(searchTerm)
|
|
} catch (error) {
|
|
console.warn('Workflow nodes search failed:', error)
|
|
return []
|
|
}
|
|
},
|
|
}
|