mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-23 18:56:12 +01:00
chore: re-organize message modules, fix icon size, convo reset properly rebuilds Tree
This commit is contained in:
parent
45ca0a8713
commit
96ca783517
8 changed files with 103 additions and 90 deletions
|
|
@ -1,7 +1,9 @@
|
|||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import buildTree from '~/utils/buildTree';
|
||||
|
||||
const initialState = {
|
||||
messages: [],
|
||||
messageTree: []
|
||||
};
|
||||
|
||||
const currentSlice = createSlice({
|
||||
|
|
@ -10,6 +12,7 @@ const currentSlice = createSlice({
|
|||
reducers: {
|
||||
setMessages: (state, action) => {
|
||||
state.messages = action.payload;
|
||||
state.messageTree = buildTree(action.payload);
|
||||
},
|
||||
setEmptyMessage: (state) => {
|
||||
state.messages = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue