Skip to content

Commit 07c2272

Browse files
committed
remove unused/unneeded zustand stores, refactored stores for consistency
1 parent dbdaf4f commit 07c2272

File tree

152 files changed

+1185
-1479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+1185
-1479
lines changed

apps/sim/app/api/environment/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { z } from 'zod'
77
import { getSession } from '@/lib/auth'
88
import { decryptSecret, encryptSecret } from '@/lib/core/security/encryption'
99
import { generateRequestId } from '@/lib/core/utils/request'
10-
import type { EnvironmentVariable } from '@/stores/settings/environment/types'
10+
import type { EnvironmentVariable } from '@/stores/settings/environment'
1111

1212
const logger = createLogger('EnvironmentAPI')
1313

apps/sim/app/api/v1/admin/workflows/import/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { workflow, workspace } from '@sim/db/schema'
1919
import { createLogger } from '@sim/logger'
2020
import { eq } from 'drizzle-orm'
2121
import { NextResponse } from 'next/server'
22+
import { parseWorkflowJson } from '@/lib/workflows/operations/import-export'
2223
import { saveWorkflowToNormalizedTables } from '@/lib/workflows/persistence/utils'
2324
import { withAdminAuth } from '@/app/api/v1/admin/middleware'
2425
import {
@@ -31,7 +32,6 @@ import {
3132
type WorkflowImportRequest,
3233
type WorkflowVariable,
3334
} from '@/app/api/v1/admin/types'
34-
import { parseWorkflowJson } from '@/stores/workflows/json/importer'
3535

3636
const logger = createLogger('AdminWorkflowImportAPI')
3737

apps/sim/app/api/v1/admin/workspaces/[id]/import/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { NextResponse } from 'next/server'
3131
import {
3232
extractWorkflowName,
3333
extractWorkflowsFromZip,
34+
parseWorkflowJson,
3435
} from '@/lib/workflows/operations/import-export'
3536
import { saveWorkflowToNormalizedTables } from '@/lib/workflows/persistence/utils'
3637
import { withAdminAuthParams } from '@/app/api/v1/admin/middleware'
@@ -46,7 +47,6 @@ import {
4647
type WorkspaceImportRequest,
4748
type WorkspaceImportResponse,
4849
} from '@/app/api/v1/admin/types'
49-
import { parseWorkflowJson } from '@/stores/workflows/json/importer'
5050

5151
const logger = createLogger('AdminWorkspaceImportAPI')
5252

apps/sim/app/workspace/[workspaceId]/logs/hooks/use-log-details-resize.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useCallback, useEffect, useState } from 'react'
2-
import { MIN_LOG_DETAILS_WIDTH, useLogDetailsUIStore } from '@/stores/logs/store'
2+
import { useLogDetailsUIStore } from '@/stores/logs/store'
3+
import { MIN_LOG_DETAILS_WIDTH } from '@/stores/logs/utils'
34

45
/**
56
* Hook for handling log details panel resize via mouse drag.

apps/sim/app/workspace/[workspaceId]/providers/provider-models-loader.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import {
88
updateOpenRouterProviderModels,
99
updateVLLMProviderModels,
1010
} from '@/providers/utils'
11-
import { useProvidersStore } from '@/stores/providers/store'
12-
import type { ProviderName } from '@/stores/providers/types'
11+
import { type ProviderName, useProvidersStore } from '@/stores/providers'
1312

1413
const logger = createLogger('ProviderModelsLoader')
1514

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ import {
4848
} from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-float'
4949
import { useWorkflowExecution } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution'
5050
import type { BlockLog, ExecutionResult } from '@/executor/types'
51-
import { getChatPosition, useChatStore } from '@/stores/chat/store'
52-
import { useExecutionStore } from '@/stores/execution/store'
51+
import { useChatStore } from '@/stores/chat/store'
52+
import { getChatPosition } from '@/stores/chat/utils'
53+
import { useExecutionStore } from '@/stores/execution'
5354
import { useOperationQueue } from '@/stores/operation-queue/store'
5455
import { useTerminalConsoleStore } from '@/stores/terminal'
5556
import { useWorkflowRegistry } from '@/stores/workflows/registry/store'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/command-list/command-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Button } from '@/components/emcn'
99
import { AgentIcon } from '@/components/icons'
1010
import { cn } from '@/lib/core/utils/cn'
1111
import { usePreventZoom } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks'
12-
import { useSearchModalStore } from '@/stores/search-modal/store'
12+
import { useSearchModalStore } from '@/stores/modals/search/store'
1313

1414
const logger = createLogger('WorkflowCommandList')
1515

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/diff-controls/diff-controls.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import clsx from 'clsx'
44
import { Eye, EyeOff } from 'lucide-react'
55
import { Button } from '@/components/emcn'
66
import { usePreventZoom } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks'
7-
import { useCopilotStore } from '@/stores/panel/copilot/store'
7+
import { useCopilotStore } from '@/stores/panel'
88
import { useTerminalStore } from '@/stores/terminal'
99
import { useWorkflowDiffStore } from '@/stores/workflow-diff'
1010
import { useWorkflowRegistry } from '@/stores/workflows/registry/store'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/components/usage-limit-actions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Button } from '@/components/emcn'
66
import { canEditUsageLimit } from '@/lib/billing/subscriptions/utils'
77
import { isHosted } from '@/lib/core/config/feature-flags'
88
import { useSubscriptionData, useUpdateUsageLimit } from '@/hooks/queries/subscription'
9-
import { useCopilotStore } from '@/stores/panel/copilot/store'
9+
import { useCopilotStore } from '@/stores/panel'
1010

1111
const LIMIT_INCREMENTS = [0, 50, 100] as const
1212

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import {
1919
useSuccessTimers,
2020
} from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/hooks'
2121
import { UserInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/user-input'
22-
import { useCopilotStore } from '@/stores/panel/copilot/store'
23-
import type { CopilotMessage as CopilotMessageType } from '@/stores/panel/copilot/types'
22+
import type { CopilotMessage as CopilotMessageType } from '@/stores/panel'
23+
import { useCopilotStore } from '@/stores/panel'
2424

2525
/**
2626
* Props for the CopilotMessage component

0 commit comments

Comments
 (0)