- Replace contextsHandlers with Redux actions in InputMessage.tsx.
- Update InputContexts to use useSelector and useDispatch.
- Remove onRefillClick prop and use Redux actions in MessageContainer.tsx.
- Update inputSlice with new actions for context management.
- Import selectGenerating, newMessage, and startGenerating in InputMessage.tsx.
- Remove onSendClick prop and use Redux actions instead.
- Add messageUtil calls to chatSlice for sendMessage, regeneration, and stopDevChat.
- Update react-redux to ^8.0.7.
- Add remote-redux-devtools ^0.5.16 and @reduxjs/toolkit ^1.9.5.
- Implement Redux store and inputSlice for managing input state.
- Refactor InputMessage and ChatPanel components to use Redux.
In this commit, we updated the InputMessage component to sort the context menu items alphabetically, with the exception of the <custom command> item, which is placed at the end of the list. This change improves the user experience by providing a more organized and predictable order for the context menu items. The sorting logic was added to the contextMenusNode constant using the sort() and localeCompare() methods.
In this commit, we simplified the icon rendering logic in the InputMessage component by removing the unnecessary condition for the <custom command> name. This change makes the code more concise and easier to understand.
In this commit, we simplified the width prop handling in the ChatPanel components by directly passing the width value instead of the entire chatContainerRect object. This change makes the code more readable and easier to maintain.