-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
refactor: migrate chat lock state to useFlowStore #6166
Open
Cristhianzl
wants to merge
5
commits into
main
Choose a base branch
from
cz/fix-lock-chat
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+37
−111
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…iewWrapper and ChatView components ♻️ (frontend): refactor ChatMessage component to use useFlowStore for lockChat state management instead of passing it as a prop
dosubot
bot
added
size:M
This PR changes 30-99 lines, ignoring generated files.
javascript
Pull requests that update Javascript code
labels
Feb 6, 2025
anovazzi1
requested changes
Feb 7, 2025
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.
if we are going to do this change i suggest we use only isBuilding variable and remve lock chat from it to decrease complexity
sounds good |
♻️ (chat-message.tsx): Refactor code to use isBuilding state instead of setLockChat and lockChat variables ♻️ (new-modal.tsx): Refactor code to remove setLockChat function and references ♻️ (flowStore.ts): Refactor code to remove setLockChat function and lockChat variable ♻️ (components/index.ts): Refactor code to remove setLockChat function and lockChat variable ♻️ (flow/index.ts): Refactor code to remove setLockChat function and lockChat variable ♻️ (buildUtils.ts): Refactor code to remove setLockChat function and references
github-actions
bot
added
refactor
Maintenance tasks and housekeeping
and removed
refactor
Maintenance tasks and housekeeping
labels
Feb 7, 2025
… for better clarity and semantics in the code.
github-actions
bot
added
refactor
Maintenance tasks and housekeeping
and removed
refactor
Maintenance tasks and housekeeping
labels
Feb 7, 2025
…wrapper.tsx, upload-file-button.tsx, use-focus-unlock.ts, use-upload.ts, chat-message.tsx, index.ts): Remove lockChat variable and replace it with isBuilding variable to improve code readability and consistency.
dosubot
bot
added
size:L
This PR changes 100-499 lines, ignoring generated files.
and removed
size:M
This PR changes 30-99 lines, ignoring generated files.
labels
Feb 7, 2025
github-actions
bot
added
refactor
Maintenance tasks and housekeeping
and removed
refactor
Maintenance tasks and housekeeping
labels
Feb 7, 2025
…utton component to improve code readability and maintainability
github-actions
bot
added
refactor
Maintenance tasks and housekeeping
and removed
refactor
Maintenance tasks and housekeeping
labels
Feb 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
javascript
Pull requests that update Javascript code
refactor
Maintenance tasks and housekeeping
size:L
This PR changes 100-499 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request focuses on refactoring the chat locking mechanism in the
IOModal
component and its related subcomponents. The changes primarily involve removing thelockChat
andsetLockChat
props and replacing them with state management using theuseFlowStore
hook.Refactoring of chat locking mechanism:
lockChat
andsetLockChat
props fromChatViewWrapper
andChatView
components and their respective type definitions. [1] [2] [3] [4] [5] [6] [7]lockChat
andsetLockChat
state management usinguseFlowStore
inChatView
andChatMessage
components. [1] [2]ChatMessage
component to use the new state management forlockChat
andsetLockChat
, and adjusted the conditional rendering logic based on the new state. [1] [2]lockChat
andsetLockChat
from theIOModal
component and its related logic. [1] [2] [3] [4]