mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 03:10:15 +01:00
23 lines
451 B
JavaScript
23 lines
451 B
JavaScript
|
|
import { createSlice } from '@reduxjs/toolkit';
|
||
|
|
|
||
|
|
const initialState = {
|
||
|
|
active: false,
|
||
|
|
conversationId: null,
|
||
|
|
parentMessageId: null,
|
||
|
|
};
|
||
|
|
|
||
|
|
const currentSlice = createSlice({
|
||
|
|
name: 'convo',
|
||
|
|
initialState,
|
||
|
|
reducers: {
|
||
|
|
setConversation: (state, action) => {
|
||
|
|
const { payload } = action;
|
||
|
|
state = { ...state, ...payload };
|
||
|
|
},
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
export const { setConversation } = currentSlice.actions;
|
||
|
|
|
||
|
|
export default currentSlice.reducer;
|