Skip to content

Commit

Permalink
🚚 chore: rename store/files to store/file
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Dec 1, 2023
1 parent c384b7f commit 94029d3
Show file tree
Hide file tree
Showing 19 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/app/chat/(desktop)/features/ChatInput/DragUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/app/chat/(mobile)/features/ChatInput/Files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/app/chat/components/FileList/FileItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/app/chat/components/FileList/Lightbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion src/app/chat/features/ChatInput/ActionBar/Clear.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/app/chat/features/ChatInput/ActionBar/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
4 changes: 2 additions & 2 deletions src/app/chat/features/ChatInput/useSend.ts
Original file line number Diff line number Diff line change
@@ -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) => [
Expand Down
2 changes: 1 addition & 1 deletion src/app/settings/common/Common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/services/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 94029d3

Please sign in to comment.