diff --git a/web/app/components/workflow/skill/file-tree/index.tsx b/web/app/components/workflow/skill/file-tree/index.tsx index 8c96eddaca..95186ee73c 100644 --- a/web/app/components/workflow/skill/file-tree/index.tsx +++ b/web/app/components/workflow/skill/file-tree/index.tsx @@ -1,8 +1,8 @@ 'use client' import type { NodeApi, TreeApi } from 'react-arborist' -import type { OpensObject } from '../store' import type { TreeNodeData } from '../type' +import type { OpensObject } from '@/app/components/workflow/store/workflow/skill-editor-slice' import { RiDragDropLine } from '@remixicon/react' import { useIsMutating } from '@tanstack/react-query' import { useSize } from 'ahooks' diff --git a/web/app/components/workflow/store/workflow/index.ts b/web/app/components/workflow/store/workflow/index.ts index d9a368fd91..5c00de2d2c 100644 --- a/web/app/components/workflow/store/workflow/index.ts +++ b/web/app/components/workflow/store/workflow/index.ts @@ -10,20 +10,19 @@ import type { HistorySliceShape } from './history-slice' import type { LayoutSliceShape } from './layout-slice' import type { NodeSliceShape } from './node-slice' import type { PanelSliceShape } from './panel-slice' +import type { SkillEditorSliceShape } from './skill-editor-slice' import type { ToolSliceShape } from './tool-slice' import type { VersionSliceShape } from './version-slice' import type { WorkflowDraftSliceShape } from './workflow-draft-slice' import type { WorkflowSliceShape } from './workflow-slice' import type { RagPipelineSliceShape } from '@/app/components/rag-pipeline/store' import type { WorkflowSliceShape as WorkflowAppSliceShape } from '@/app/components/workflow-app/store/workflow/workflow-slice' -import type { SkillEditorSliceShape } from '@/app/components/workflow/skill/store' import { useContext } from 'react' import { useStore as useZustandStore, } from 'zustand' import { createStore } from 'zustand/vanilla' import { WorkflowContext } from '@/app/components/workflow/context' -import { createSkillEditorSlice } from '@/app/components/workflow/skill/store' import { createChatVariableSlice } from './chat-variable-slice' import { createInspectVarsSlice } from './debug/inspect-vars-slice' import { createEnvVariableSlice } from './env-variable-slice' @@ -32,8 +31,8 @@ import { createHelpLineSlice } from './help-line-slice' import { createHistorySlice } from './history-slice' import { createLayoutSlice } from './layout-slice' import { createNodeSlice } from './node-slice' - import { createPanelSlice } from './panel-slice' +import { createSkillEditorSlice } from './skill-editor-slice' import { createToolSlice } from './tool-slice' import { createVersionSlice } from './version-slice' import { createWorkflowDraftSlice } from './workflow-draft-slice' diff --git a/web/app/components/workflow/skill/store/index.ts b/web/app/components/workflow/store/workflow/skill-editor-slice.ts similarity index 95% rename from web/app/components/workflow/skill/store/index.ts rename to web/app/components/workflow/store/workflow/skill-editor-slice.ts index 2314845711..f998130493 100644 --- a/web/app/components/workflow/skill/store/index.ts +++ b/web/app/components/workflow/store/workflow/skill-editor-slice.ts @@ -24,7 +24,7 @@ export type TabSliceShape = { isPreviewTab: (fileId: string) => boolean } -export const createTabSlice: StateCreator = (set, get) => ({ +const createTabSlice: StateCreator = (set, get) => ({ openTabIds: [], activeTabId: null, previewTabId: null, @@ -114,7 +114,7 @@ export type FileTreeSliceShape = { getOpensObject: () => OpensObject } -export const createFileTreeSlice: StateCreator = (set, get) => ({ +const createFileTreeSlice: StateCreator = (set, get) => ({ expandedFolderIds: new Set(), setExpandedFolderIds: (ids: Set) => { @@ -164,7 +164,7 @@ export type DirtySliceShape = { getDraftContent: (fileId: string) => string | undefined } -export const createDirtySlice: StateCreator = (set, get) => ({ +const createDirtySlice: StateCreator = (set, get) => ({ dirtyContents: new Map(), setDraftContent: (fileId: string, content: string) => { @@ -199,7 +199,7 @@ export type FileOperationsMenuSliceShape = { setContextMenu: (menu: FileOperationsMenuSliceShape['contextMenu']) => void } -export const createFileOperationsMenuSlice: StateCreator = set => ({ +const createFileOperationsMenuSlice: StateCreator = set => ({ contextMenu: null, setContextMenu: (contextMenu) => {