Move chatSlice and inputSlice to reducers folder

- Moved chatSlice and inputSlice from views to reducers folder.
- Updated import paths for chatSlice and inputSlice in various files.
- Adjusted import paths for chatSlice and inputSlice in store.ts.
This commit is contained in:
Rankin Zheng 2023-08-03 16:49:30 +08:00
parent b900fe0b8b
commit cec95185b3
11 changed files with 13 additions and 13 deletions

View File

@ -23,11 +23,11 @@ import {
fetchHistoryMessages,
newMessage,
startSystemMessage,
} from './chatSlice';
} from '@/views/reducers/chatSlice';
import InputMessage from '@/views/components/InputMessage';
import MessageContainer from './MessageContainer';
import { clearContexts, setValue } from './inputSlice';
import { clearContexts, setValue } from '@/views/reducers/inputSlice';
const chatPanel = () => {

View File

@ -12,7 +12,7 @@ import {
selectCurrentMessage,
selecLastMessage,
selectResponsed,
} from './chatSlice';
} from '@/views/reducers/chatSlice';
const MessageBlink = () => {
const responsed = useAppSelector(selectResponsed);

View File

@ -7,7 +7,7 @@ import MessageHeader from "@/views/MessageHeader";
import { useAppSelector } from '@/views/hooks';
import {
selectMessages,
} from './chatSlice';
} from '@/views/reducers/chatSlice';
const MessageContext = (props: any) => {

View File

@ -12,12 +12,12 @@ import { useAppDispatch } from '@/views/hooks';
import {
setContexts,
setValue,
} from './inputSlice';
} from '@/views/reducers/inputSlice';
import {
deleteMessage,
popMessage
} from './chatSlice';
} from '@/views/reducers/chatSlice';
const MessageHeader = (props: any) => {
const { item, showEdit = false, showDelete = true } = props;

View File

@ -6,7 +6,7 @@ import { useAppDispatch, useAppSelector } from '@/views/hooks';
import {
selectContexts,
removeContext,
} from '@/views/inputSlice';
} from '@/views/reducers/inputSlice';
const InputContexts = () => {
const dispatch = useAppDispatch();

View File

@ -23,12 +23,12 @@ import {
closeMenu,
fetchContextMenus,
fetchCommandMenus,
} from '@/views/inputSlice';
} from '@/views/reducers/inputSlice';
import {
selectGenerating,
newMessage,
startGenerating,
} from '@/views/chatSlice';
} from '@/views/reducers/chatSlice';
const InputMessage = (props: any) => {
const { width } = props;

View File

@ -6,7 +6,7 @@ import { useAppDispatch } from '@/views/hooks';
import {
reGenerating,
} from '@/views/chatSlice';
} from '@/views/reducers/chatSlice';
const RegenerationButton = () => {
const dispatch = useAppDispatch();

View File

@ -6,7 +6,7 @@ import { useAppDispatch } from '@/views/hooks';
import {
stopGenerating,
} from '../../chatSlice';
} from '@/views/reducers/chatSlice';
const StopButton = () => {
const dispatch = useAppDispatch();

View File

@ -1,6 +1,6 @@
import { configureStore } from '@reduxjs/toolkit';
import inputReducer from '@/views/inputSlice';
import chatReducer from '@/views/chatSlice';
import inputReducer from '@/views/reducers/inputSlice';
import chatReducer from '@/views/reducers/chatSlice';
export const store = configureStore({
reducer: {