-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: message composer #2669
base: rc
Are you sure you want to change the base?
feat: message composer #2669
Conversation
41fe189
to
98fe4f2
Compare
dc919e7
to
0a7dc0f
Compare
0a7dc0f
to
991b070
Compare
…textComposerEmojiMiddleware
…/message-composer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refactors various components related to message composition and handling by replacing StreamMessage with LocalMessage and modifying how message drafts and thread instances are managed. Key changes include:
- Updating type references across components (e.g. EventComponent, ChannelPreview, Channel).
- Removing deprecated ChatAutoComplete tests and exports.
- Refactoring functions in Channel components to support message drafts and update message sending logic.
Reviewed Changes
Copilot reviewed 126 out of 127 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/components/EventComponent/EventComponent.tsx | Updated type reference for message property to use LocalMessage |
src/components/ChatAutoComplete/* | Removed redundant exports and test files for ChatAutoComplete |
src/components/Chat/hooks/useChat.ts | Hardcoded version variable to an empty string |
src/components/Channel/* | Refactored message sending/updating logic and thread management |
src/components/AutoCompleteTextarea/* | Removed unused components and types |
examples/vite/src/App.tsx | Added emojiSearchIndex prop to Channel |
Files not reviewed (1)
- package.json: Language not supported
Comments suppressed due to low confidence (2)
src/components/Channel/Channel.tsx:1092
- The removal of the quotedMessage state reset in the openThread function might lead to unexpected behavior when opening threads; please verify if this change is intended.
const openThread = (message: LocalMessage, event?: React.BaseSyntheticEvent) => {
src/components/Channel/Channel.tsx:961
- [nitpick] The use of similar parameter names 'localMessage' and 'message' in doSendMessage can be ambiguous; consider renaming one of them to improve clarity.
const doSendMessage = async ({ localMessage, message, options, }: {
const version = ''; //process.env.STREAM_CHAT_REACT_VERSION; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding the version to an empty string disables version tracking; confirm if this change is intentional or if the original process.env value should be used.
const version = ''; //process.env.STREAM_CHAT_REACT_VERSION; | |
const version = process.env.STREAM_CHAT_REACT_VERSION || ''; |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Submit a pull request
🎯 Goal
Describe why we are making this change
🛠 Implementation details
Provide a description of the implementation
🎨 UI Changes
Add relevant screenshots