From cc89e80b95cd429359f9d0beda40388bd0ae2313 Mon Sep 17 00:00:00 2001 From: Emir Karabeg Date: Sat, 15 Feb 2025 19:54:55 -0800 Subject: [PATCH] fix(file-structure): moved registry to file in workflow --- app/w/[id]/workflow.tsx | 2 +- app/w/components/console/console.tsx | 2 +- app/w/components/control-bar/control-bar.tsx | 2 +- app/w/components/sidebar/sidebar.tsx | 2 +- app/w/hooks/use-workflow-execution.ts | 2 +- stores/workflow/{registry.ts => registry/store.ts} | 4 ++-- stores/workflow/{registry-types.ts => registry/types.ts} | 0 7 files changed, 7 insertions(+), 7 deletions(-) rename stores/workflow/{registry.ts => registry/store.ts} (98%) rename stores/workflow/{registry-types.ts => registry/types.ts} (100%) diff --git a/app/w/[id]/workflow.tsx b/app/w/[id]/workflow.tsx index 30f873ac90..fcd88c2b8e 100644 --- a/app/w/[id]/workflow.tsx +++ b/app/w/[id]/workflow.tsx @@ -14,7 +14,7 @@ import ReactFlow, { import 'reactflow/dist/style.css' import { useNotificationStore } from '@/stores/notifications/store' import { initializeStateLogger } from '@/stores/workflow/logger' -import { useWorkflowRegistry } from '@/stores/workflow/registry' +import { useWorkflowRegistry } from '@/stores/workflow/registry/store' import { useWorkflowStore } from '@/stores/workflow/store' import { NotificationList } from '@/app/w/components/notifications/notifications' import { getBlock } from '../../../blocks' diff --git a/app/w/components/console/console.tsx b/app/w/components/console/console.tsx index 4a4c5f11b0..357a6b4b39 100644 --- a/app/w/components/console/console.tsx +++ b/app/w/components/console/console.tsx @@ -6,7 +6,7 @@ import { Button } from '@/components/ui/button' import { ScrollArea } from '@/components/ui/scroll-area' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { useConsoleStore } from '@/stores/console/store' -import { useWorkflowRegistry } from '@/stores/workflow/registry' +import { useWorkflowRegistry } from '@/stores/workflow/registry/store' import { ConsoleEntry } from './components/console-entry/console-entry' export function Console() { diff --git a/app/w/components/control-bar/control-bar.tsx b/app/w/components/control-bar/control-bar.tsx index 069c90155d..a30b259cbf 100644 --- a/app/w/components/control-bar/control-bar.tsx +++ b/app/w/components/control-bar/control-bar.tsx @@ -24,7 +24,7 @@ import { } from '@/components/ui/dropdown-menu' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { useNotificationStore } from '@/stores/notifications/store' -import { useWorkflowRegistry } from '@/stores/workflow/registry' +import { useWorkflowRegistry } from '@/stores/workflow/registry/store' import { useWorkflowStore } from '@/stores/workflow/store' import { useWorkflowExecution } from '../../hooks/use-workflow-execution' import { HistoryDropdownItem } from './components/history-dropdown-item' diff --git a/app/w/components/sidebar/sidebar.tsx b/app/w/components/sidebar/sidebar.tsx index 9db8aaef1e..8d80fed30d 100644 --- a/app/w/components/sidebar/sidebar.tsx +++ b/app/w/components/sidebar/sidebar.tsx @@ -7,7 +7,7 @@ import { Plus, Settings } from 'lucide-react' import { AgentIcon } from '@/components/icons' import { Button } from '@/components/ui/button' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' -import { useWorkflowRegistry } from '@/stores/workflow/registry' +import { useWorkflowRegistry } from '@/stores/workflow/registry/store' import { NavItem } from './components/nav-item/nav-item' import { SettingsModal } from './components/settings-modal/settings-modal' diff --git a/app/w/hooks/use-workflow-execution.ts b/app/w/hooks/use-workflow-execution.ts index 2a14cea56c..816213993d 100644 --- a/app/w/hooks/use-workflow-execution.ts +++ b/app/w/hooks/use-workflow-execution.ts @@ -2,7 +2,7 @@ import { useCallback, useState } from 'react' import { useConsoleStore } from '@/stores/console/store' import { useEnvironmentStore } from '@/stores/environment/store' import { useNotificationStore } from '@/stores/notifications/store' -import { useWorkflowRegistry } from '@/stores/workflow/registry' +import { useWorkflowRegistry } from '@/stores/workflow/registry/store' import { useWorkflowStore } from '@/stores/workflow/store' import { Executor } from '@/executor' import { ExecutionResult } from '@/executor/types' diff --git a/stores/workflow/registry.ts b/stores/workflow/registry/store.ts similarity index 98% rename from stores/workflow/registry.ts rename to stores/workflow/registry/store.ts index cf199aa6ee..a9a999424f 100644 --- a/stores/workflow/registry.ts +++ b/stores/workflow/registry/store.ts @@ -1,7 +1,7 @@ import { create } from 'zustand' import { devtools } from 'zustand/middleware' -import { WorkflowMetadata, WorkflowRegistry } from './registry-types' -import { useWorkflowStore } from './store' +import { useWorkflowStore } from '../store' +import { WorkflowMetadata, WorkflowRegistry } from './types' export const useWorkflowRegistry = create()( devtools( diff --git a/stores/workflow/registry-types.ts b/stores/workflow/registry/types.ts similarity index 100% rename from stores/workflow/registry-types.ts rename to stores/workflow/registry/types.ts