update readme, setup files, and clear convo bug

This commit is contained in:
Danny Avila 2023-03-07 14:43:55 -05:00
parent 5ad32e211f
commit a8eaf2452a
6 changed files with 28 additions and 17 deletions

View file

@ -38,11 +38,14 @@ const currentSlice = createSlice({
},
removeConvo: (state, action) => {
state.convos = state.convos.filter((convo) => convo.conversationId !== action.payload);
},
removeAll: (state) => {
state.convos = [];
}
}
});
export const { setConversation, setConvos, setError, incrementPage, removeConvo } =
export const { setConversation, setConvos, setError, incrementPage, removeConvo, removeAll } =
currentSlice.actions;
export default currentSlice.reducer;

View file

@ -33,7 +33,6 @@ const currentSlice = createSlice({
initialState,
reducers: {
setModels: (state, action) => {
console.log('setModels', action.payload);
const models = [...initialState.models, ...action.payload];
state.models = models;
const modelMap = {};

View file

@ -27,7 +27,6 @@ const currentSlice = createSlice({
state.chatGptLabel = action.payload.chatGptLabel;
},
setCustomModel: (state, action) => {
console.log('setCustomModel', action.payload);
state.customModel = action.payload;
}
}