mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
feat: loading state for messages
This commit is contained in:
parent
afae13eec6
commit
79f050bac7
6 changed files with 43 additions and 8 deletions
|
|
@ -2,6 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
|
|||
|
||||
const initialState = {
|
||||
isSubmitting: false,
|
||||
stopStream: false,
|
||||
disabled: false,
|
||||
model: 'chatgpt',
|
||||
promptPrefix: '',
|
||||
|
|
@ -16,6 +17,9 @@ const currentSlice = createSlice({
|
|||
setSubmitState: (state, action) => {
|
||||
state.isSubmitting = action.payload;
|
||||
},
|
||||
setStopStream: (state, action) => {
|
||||
state.stopStream = action.payload;
|
||||
},
|
||||
setDisabled: (state, action) => {
|
||||
state.disabled = action.payload;
|
||||
},
|
||||
|
|
@ -32,7 +36,7 @@ const currentSlice = createSlice({
|
|||
}
|
||||
});
|
||||
|
||||
export const { setSubmitState, setDisabled, setModel, setCustomGpt, setCustomModel } =
|
||||
export const { setSubmitState, setStopStream, setDisabled, setModel, setCustomGpt, setCustomModel } =
|
||||
currentSlice.actions;
|
||||
|
||||
export default currentSlice.reducer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue