diff --git a/src/app/chat/(desktop)/features/ChatInput/DragUpload.tsx b/src/app/chat/(desktop)/features/ChatInput/DragUpload.tsx index ce8063fd3472..e02fa84bed6c 100644 --- a/src/app/chat/(desktop)/features/ChatInput/DragUpload.tsx +++ b/src/app/chat/(desktop)/features/ChatInput/DragUpload.tsx @@ -6,7 +6,7 @@ import { memo, useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Center, Flexbox } from 'react-layout-kit'; -import { useFileStore } from '@/store/files'; +import { useFileStore } from '@/store/file'; const useStyles = createStyles(({ css, token, stylish }) => { return { diff --git a/src/app/chat/(desktop)/features/ChatInput/Footer/LocalFiles.tsx b/src/app/chat/(desktop)/features/ChatInput/Footer/LocalFiles.tsx index d5163b060273..760038af05ba 100644 --- a/src/app/chat/(desktop)/features/ChatInput/Footer/LocalFiles.tsx +++ b/src/app/chat/(desktop)/features/ChatInput/Footer/LocalFiles.tsx @@ -1,7 +1,7 @@ import { memo } from 'react'; import FileList from '@/app/chat/components/FileList'; -import { useFileStore } from '@/store/files'; +import { useFileStore } from '@/store/file'; export const LocalFiles = memo(() => { const inputFilesList = useFileStore((s) => s.inputFilesList); diff --git a/src/app/chat/(mobile)/features/ChatInput/Files.tsx b/src/app/chat/(mobile)/features/ChatInput/Files.tsx index 9b5439d32ec1..4d0bcae1a512 100644 --- a/src/app/chat/(mobile)/features/ChatInput/Files.tsx +++ b/src/app/chat/(mobile)/features/ChatInput/Files.tsx @@ -2,7 +2,7 @@ import { memo } from 'react'; import { Flexbox } from 'react-layout-kit'; import FileList from '@/app/chat/components/FileList'; -import { useFileStore } from '@/store/files'; +import { useFileStore } from '@/store/file'; const Files = memo(() => { const inputFilesList = useFileStore((s) => s.inputFilesList); diff --git a/src/app/chat/components/FileList/FileItem.tsx b/src/app/chat/components/FileList/FileItem.tsx index 359d54ec2142..63a873ac8b08 100644 --- a/src/app/chat/components/FileList/FileItem.tsx +++ b/src/app/chat/components/FileList/FileItem.tsx @@ -6,7 +6,7 @@ import Image from 'next/image'; import { memo } from 'react'; import { Center, Flexbox } from 'react-layout-kit'; -import { useFileStore } from '@/store/files'; +import { useFileStore } from '@/store/file'; import { IMAGE_SIZE, useStyles } from './FileItem.style'; diff --git a/src/app/chat/components/FileList/Lightbox.tsx b/src/app/chat/components/FileList/Lightbox.tsx index 192b71f3d60f..5fd560808a79 100644 --- a/src/app/chat/components/FileList/Lightbox.tsx +++ b/src/app/chat/components/FileList/Lightbox.tsx @@ -2,7 +2,7 @@ import { createStyles } from 'antd-style'; import { memo } from 'react'; import Lightbox from 'react-spring-lightbox'; -import { filesSelectors, useFileStore } from '@/store/files'; +import { filesSelectors, useFileStore } from '@/store/file'; const useStyles = createStyles(({ css, token }) => ({ wrapper: css` diff --git a/src/app/chat/features/ChatInput/ActionBar/Clear.tsx b/src/app/chat/features/ChatInput/ActionBar/Clear.tsx index 85a579a50110..ef41d86ac8b0 100644 --- a/src/app/chat/features/ChatInput/ActionBar/Clear.tsx +++ b/src/app/chat/features/ChatInput/ActionBar/Clear.tsx @@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next'; import HotKeys from '@/components/HotKeys'; import { CLEAN_MESSAGE_KEY, PREFIX_KEY } from '@/const/hotkeys'; import { useChatStore } from '@/store/chat'; -import { useFileStore } from '@/store/files'; +import { useFileStore } from '@/store/file'; const Clear = memo(() => { const { t } = useTranslation('setting'); diff --git a/src/app/chat/features/ChatInput/ActionBar/FileUpload.tsx b/src/app/chat/features/ChatInput/ActionBar/FileUpload.tsx index 256dfbecfcc5..58c442e1067f 100644 --- a/src/app/chat/features/ChatInput/ActionBar/FileUpload.tsx +++ b/src/app/chat/features/ChatInput/ActionBar/FileUpload.tsx @@ -6,7 +6,7 @@ import { memo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Center } from 'react-layout-kit'; -import { useFileStore } from '@/store/files'; +import { useFileStore } from '@/store/file'; import { useSessionStore } from '@/store/session'; import { agentSelectors } from '@/store/session/selectors'; diff --git a/src/app/chat/features/ChatInput/useSend.ts b/src/app/chat/features/ChatInput/useSend.ts index d6ba49fe82ae..6f9505c8fed4 100644 --- a/src/app/chat/features/ChatInput/useSend.ts +++ b/src/app/chat/features/ChatInput/useSend.ts @@ -1,7 +1,7 @@ import { useCallback } from 'react'; -import { filesSelectors, useFileStore } from '@/store/files'; -import { useChatStore } from 'src/store/chat'; +import { useChatStore } from '@/store/chat'; +import { filesSelectors, useFileStore } from '@/store/file'; export const useSendMessage = () => { const [sendMessage, updateInputMessage] = useChatStore((s) => [ diff --git a/src/app/settings/common/Common.tsx b/src/app/settings/common/Common.tsx index 3459a09e6d64..a91c66a491d4 100644 --- a/src/app/settings/common/Common.tsx +++ b/src/app/settings/common/Common.tsx @@ -11,7 +11,7 @@ import { DEFAULT_SETTINGS } from '@/const/settings'; import AvatarWithUpload from '@/features/AvatarWithUpload'; import { localeOptions } from '@/locales/options'; import { useChatStore } from '@/store/chat'; -import { useFileStore } from '@/store/files'; +import { useFileStore } from '@/store/file'; import { settingsSelectors, useGlobalStore } from '@/store/global'; import { usePluginStore } from '@/store/plugin'; import { useSessionStore } from '@/store/session'; diff --git a/src/services/chat.ts b/src/services/chat.ts index 6937637bd4c2..0bab1a7f8555 100644 --- a/src/services/chat.ts +++ b/src/services/chat.ts @@ -3,7 +3,7 @@ import { merge } from 'lodash-es'; import { VISION_MODEL_WHITE_LIST } from '@/const/llm'; import { DEFAULT_AGENT_CONFIG } from '@/const/settings'; -import { filesSelectors, useFileStore } from '@/store/files'; +import { filesSelectors, useFileStore } from '@/store/file'; import { usePluginStore } from '@/store/plugin'; import { pluginSelectors } from '@/store/plugin/selectors'; import { ChatMessage } from '@/types/chatMessage'; diff --git a/src/store/files/index.ts b/src/store/file/index.ts similarity index 100% rename from src/store/files/index.ts rename to src/store/file/index.ts diff --git a/src/store/files/initialState.ts b/src/store/file/initialState.ts similarity index 100% rename from src/store/files/initialState.ts rename to src/store/file/initialState.ts diff --git a/src/store/files/selectors.test.ts b/src/store/file/selectors.test.ts similarity index 100% rename from src/store/files/selectors.test.ts rename to src/store/file/selectors.test.ts diff --git a/src/store/files/selectors.ts b/src/store/file/selectors.ts similarity index 100% rename from src/store/files/selectors.ts rename to src/store/file/selectors.ts diff --git a/src/store/files/slices/images/action.test.ts b/src/store/file/slices/images/action.test.ts similarity index 100% rename from src/store/files/slices/images/action.test.ts rename to src/store/file/slices/images/action.test.ts diff --git a/src/store/files/slices/images/action.ts b/src/store/file/slices/images/action.ts similarity index 100% rename from src/store/files/slices/images/action.ts rename to src/store/file/slices/images/action.ts diff --git a/src/store/files/slices/images/index.ts b/src/store/file/slices/images/index.ts similarity index 100% rename from src/store/files/slices/images/index.ts rename to src/store/file/slices/images/index.ts diff --git a/src/store/files/slices/images/initialState.ts b/src/store/file/slices/images/initialState.ts similarity index 100% rename from src/store/files/slices/images/initialState.ts rename to src/store/file/slices/images/initialState.ts diff --git a/src/store/files/store.ts b/src/store/file/store.ts similarity index 100% rename from src/store/files/store.ts rename to src/store/file/store.ts