mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-02 00:28:51 +01:00
24 lines
538 B
JavaScript
24 lines
538 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 { conversationId, parentMessageId } = action.payload;
|
|
state.conversationId = conversationId;
|
|
state.parentMessageId = parentMessageId;
|
|
},
|
|
}
|
|
});
|
|
//
|
|
|
|
export const { setConversation } = currentSlice.actions;
|
|
|
|
export default currentSlice.reducer;
|