diff --git a/app/w/[id]/components/workflow-canvas/workflow-canvas.tsx b/app/w/[id]/components/workflow-canvas/workflow-canvas.tsx index 9241b92bd2..f1d938f333 100644 --- a/app/w/[id]/components/workflow-canvas/workflow-canvas.tsx +++ b/app/w/[id]/components/workflow-canvas/workflow-canvas.tsx @@ -9,13 +9,13 @@ import ReactFlow, { ConnectionLineType, } from 'reactflow' import { getBlock } from '../../../../../blocks' -import { useWorkflowStore } from '@/stores/workflow/workflow-store' -import { useNotificationStore } from '@/stores/notifications/notifications-store' +import { useWorkflowStore } from '@/stores/workflow/store' +import { useNotificationStore } from '@/stores/notifications/store' import { useWorkflowExecution } from '../../../hooks/use-workflow-execution' import { NotificationList } from '@/app/w/components/notifications/notifications' import { WorkflowNode } from '../workflow-node/workflow-node' import { CustomEdge } from '../custom-edge/custom-edge' -import { initializeStateLogger } from '@/stores/workflow/state-logger' +import { initializeStateLogger } from '@/stores/workflow/logger' // Define custom node and edge types for ReactFlow const nodeTypes: NodeTypes = { workflowBlock: WorkflowNode } diff --git a/app/w/[id]/workflow.tsx b/app/w/[id]/workflow.tsx index 97895f58ac..f33806675a 100644 --- a/app/w/[id]/workflow.tsx +++ b/app/w/[id]/workflow.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react' import { ReactFlowProvider } from 'reactflow' import 'reactflow/dist/style.css' -import { useWorkflowRegistry } from '@/stores/workflow/workflow-registry' +import { useWorkflowRegistry } from '@/stores/workflow/registry' import { useParams, useRouter } from 'next/navigation' import { WorkflowCanvas } from './components/workflow-canvas/workflow-canvas' diff --git a/app/w/components/control-bar/components/notification-dropdown-item.tsx b/app/w/components/control-bar/components/notification-dropdown-item.tsx index e39afbcab5..44e16bfd51 100644 --- a/app/w/components/control-bar/components/notification-dropdown-item.tsx +++ b/app/w/components/control-bar/components/notification-dropdown-item.tsx @@ -5,7 +5,7 @@ import { NotificationType, NotificationStore, } from '@/stores/notifications/types' -import { useNotificationStore } from '@/stores/notifications/notifications-store' +import { useNotificationStore } from '@/stores/notifications/store' import { cn } from '@/lib/utils' import { ErrorIcon } from '@/components/icons' import { useState, useEffect } from 'react' diff --git a/app/w/components/control-bar/control-bar.tsx b/app/w/components/control-bar/control-bar.tsx index 0d6d1fdb60..74a15477ad 100644 --- a/app/w/components/control-bar/control-bar.tsx +++ b/app/w/components/control-bar/control-bar.tsx @@ -8,14 +8,14 @@ import { DropdownMenuTrigger, } from '@/components/ui/dropdown-menu' import { History, Bell, Play, Trash2 } from 'lucide-react' -import { useNotificationStore } from '@/stores/notifications/notifications-store' +import { useNotificationStore } from '@/stores/notifications/store' import { NotificationDropdownItem } from './components/notification-dropdown-item' -import { useWorkflowStore } from '@/stores/workflow/workflow-store' +import { useWorkflowStore } from '@/stores/workflow/store' import { HistoryDropdownItem } from './components/history-dropdown-item' import { formatDistanceToNow } from 'date-fns' import { useEffect, useState } from 'react' import { useWorkflowExecution } from '../../hooks/use-workflow-execution' -import { useWorkflowRegistry } from '@/stores/workflow/workflow-registry' +import { useWorkflowRegistry } from '@/stores/workflow/registry' import { useRouter } from 'next/navigation' import { Tooltip, diff --git a/app/w/components/notifications/notifications.tsx b/app/w/components/notifications/notifications.tsx index 236a723e11..e607fcd4f2 100644 --- a/app/w/components/notifications/notifications.tsx +++ b/app/w/components/notifications/notifications.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react' import { AlertCircle, Terminal } from 'lucide-react' import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert' -import { useNotificationStore } from '@/stores/notifications/notifications-store' +import { useNotificationStore } from '@/stores/notifications/store' import { cn } from '@/lib/utils' import { ErrorIcon } from '@/components/icons' diff --git a/app/w/components/sidebar/sidebar.tsx b/app/w/components/sidebar/sidebar.tsx index f6c4905e31..44e934029b 100644 --- a/app/w/components/sidebar/sidebar.tsx +++ b/app/w/components/sidebar/sidebar.tsx @@ -9,7 +9,7 @@ import { TooltipTrigger, } from '@/components/ui/tooltip' import { AgentIcon } from '@/components/icons' -import { useWorkflowRegistry } from '@/stores/workflow/workflow-registry' +import { useWorkflowRegistry } from '@/stores/workflow/registry' import { useRouter } from 'next/navigation' import { Button } from '@/components/ui/button' import { useState } from 'react' diff --git a/app/w/components/workflow-block/components/action-bar/action-bar.tsx b/app/w/components/workflow-block/components/action-bar/action-bar.tsx index dffe846608..b575fc5d1c 100644 --- a/app/w/components/workflow-block/components/action-bar/action-bar.tsx +++ b/app/w/components/workflow-block/components/action-bar/action-bar.tsx @@ -8,7 +8,7 @@ import { ArrowLeftRight, ArrowUpDown, } from 'lucide-react' -import { useWorkflowStore } from '@/stores/workflow/workflow-store' +import { useWorkflowStore } from '@/stores/workflow/store' import { Tooltip, TooltipContent, diff --git a/app/w/components/workflow-block/components/sub-block/hooks/use-sub-block-value.ts b/app/w/components/workflow-block/components/sub-block/hooks/use-sub-block-value.ts index ded4766e62..ccc1436c59 100644 --- a/app/w/components/workflow-block/components/sub-block/hooks/use-sub-block-value.ts +++ b/app/w/components/workflow-block/components/sub-block/hooks/use-sub-block-value.ts @@ -1,4 +1,4 @@ -import { useWorkflowStore } from '@/stores/workflow/workflow-store' +import { useWorkflowStore } from '@/stores/workflow/store' import { useCallback } from 'react' export function useSubBlockValue(blockId: string, subBlockId: string) { diff --git a/app/w/components/workflow-block/workflow-block.tsx b/app/w/components/workflow-block/workflow-block.tsx index a4f0a649b5..5bba46a5f9 100644 --- a/app/w/components/workflow-block/workflow-block.tsx +++ b/app/w/components/workflow-block/workflow-block.tsx @@ -6,7 +6,7 @@ import { cn } from '@/lib/utils' import { ActionBar } from './components/action-bar/action-bar' import { ConnectionBlocks } from './components/connection-blocks/connection-blocks' import { useState } from 'react' -import { useWorkflowStore } from '@/stores/workflow/workflow-store' +import { useWorkflowStore } from '@/stores/workflow/store' import { Badge } from '@/components/ui/badge' interface WorkflowBlockProps { diff --git a/app/w/hooks/use-block-connections.ts b/app/w/hooks/use-block-connections.ts index 3227b6743a..6e18cf7f3c 100644 --- a/app/w/hooks/use-block-connections.ts +++ b/app/w/hooks/use-block-connections.ts @@ -1,4 +1,4 @@ -import { useWorkflowStore } from '@/stores/workflow/workflow-store' +import { useWorkflowStore } from '@/stores/workflow/store' import { shallow } from 'zustand/shallow' export interface ConnectedBlock { diff --git a/app/w/hooks/use-workflow-execution.ts b/app/w/hooks/use-workflow-execution.ts index 7211d5cb1d..e65e0471ca 100644 --- a/app/w/hooks/use-workflow-execution.ts +++ b/app/w/hooks/use-workflow-execution.ts @@ -1,10 +1,10 @@ import { useCallback, useState } from 'react' -import { useWorkflowStore } from '@/stores/workflow/workflow-store' +import { useWorkflowStore } from '@/stores/workflow/store' import { Serializer } from '@/serializer' import { Executor } from '@/executor' import { ExecutionResult } from '@/executor/types' -import { useNotificationStore } from '@/stores/notifications/notifications-store' -import { useWorkflowRegistry } from '@/stores/workflow/workflow-registry' +import { useNotificationStore } from '@/stores/notifications/store' +import { useWorkflowRegistry } from '@/stores/workflow/registry' export function useWorkflowExecution() { const [isExecuting, setIsExecuting] = useState(false) diff --git a/stores/notifications/notifications-store.ts b/stores/notifications/store.ts similarity index 100% rename from stores/notifications/notifications-store.ts rename to stores/notifications/store.ts diff --git a/stores/workflow/state-logger.ts b/stores/workflow/logger.ts similarity index 87% rename from stores/workflow/state-logger.ts rename to stores/workflow/logger.ts index 5fe8a5a753..f4cf901382 100644 --- a/stores/workflow/state-logger.ts +++ b/stores/workflow/logger.ts @@ -1,4 +1,4 @@ -import { useWorkflowStore } from './workflow-store' +import { useWorkflowStore } from './store' export function initializeStateLogger() { useWorkflowStore.subscribe((state) => { diff --git a/stores/workflow/history-middleware.ts b/stores/workflow/middleware.ts similarity index 100% rename from stores/workflow/history-middleware.ts rename to stores/workflow/middleware.ts diff --git a/stores/workflow/workflow-registry.ts b/stores/workflow/registry.ts similarity index 99% rename from stores/workflow/workflow-registry.ts rename to stores/workflow/registry.ts index e5ed1b3abc..4e70a57111 100644 --- a/stores/workflow/workflow-registry.ts +++ b/stores/workflow/registry.ts @@ -1,7 +1,7 @@ import { create } from 'zustand' import { devtools } from 'zustand/middleware' import { WorkflowRegistry, WorkflowMetadata } from './registry-types' -import { useWorkflowStore } from './workflow-store' +import { useWorkflowStore } from './store' export const useWorkflowRegistry = create()( devtools( diff --git a/stores/workflow/workflow-store.ts b/stores/workflow/store.ts similarity index 99% rename from stores/workflow/workflow-store.ts rename to stores/workflow/store.ts index 935d0d8c49..3ab7134dfb 100644 --- a/stores/workflow/workflow-store.ts +++ b/stores/workflow/store.ts @@ -3,7 +3,7 @@ import { devtools } from 'zustand/middleware' import { Edge } from 'reactflow' import { Position, SubBlockState, WorkflowStore } from './types' import { getBlock } from '@/blocks' -import { withHistory, WorkflowStoreWithHistory, pushHistory } from './history-middleware' +import { withHistory, WorkflowStoreWithHistory, pushHistory } from './middleware' import { resolveOutputType } from '@/blocks/utils' const initialState = {