mirror of
https://github.com/Nikhil-Doye/workflow-builder.git
synced 2026-07-22 02:01:56 +02:00
Refactor UnifiedDatabaseNode operation icons for improved readability
- Updated the operationIcons definition in UnifiedDatabaseNode to enhance code clarity by formatting the type declaration across multiple lines. - Simplified the ProcessorRegistry by consolidating database operation types into a single "database" entry, streamlining the configuration for database-related tasks.
This commit is contained in:
@@ -25,7 +25,10 @@ export const UnifiedDatabaseNode: React.FC<UnifiedDatabaseNodeProps> = ({
|
||||
// Get operation display info
|
||||
const getOperationInfo = () => {
|
||||
const operation = data.config?.operation as DatabaseOperation;
|
||||
const operationIcons: Record<DatabaseOperation, React.ComponentType<any>> = {
|
||||
const operationIcons: Record<
|
||||
DatabaseOperation,
|
||||
React.ComponentType<any>
|
||||
> = {
|
||||
query: Search,
|
||||
insert: Plus,
|
||||
update: Edit,
|
||||
|
||||
@@ -144,12 +144,7 @@ export class ProcessorRegistry {
|
||||
{ pattern: /llm|ai|gpt|openai/i, types: ["llmTask"] },
|
||||
{
|
||||
pattern: /db|database|sql/i,
|
||||
types: [
|
||||
"databaseQuery",
|
||||
"databaseInsert",
|
||||
"databaseUpdate",
|
||||
"databaseDelete",
|
||||
],
|
||||
types: ["database"],
|
||||
},
|
||||
{
|
||||
pattern: /embed|vector/i,
|
||||
|
||||
Reference in New Issue
Block a user