-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
chore: sync latest main into dev #4360
Merged
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
fix: send message button state reset on stop
* chore: Refactor thread state management • Replace isGeneratingResponseAtom with isBlockingSendAtom • Update dependencies in ChatBody, ChatInput, and MessageToolbar components • Remove unused code and variables * chore: clean states
* chore: bump cortex 1.0.7 rc * chore: test update
urmauur
approved these changes
Dec 30, 2024
This is the build for this pull request. You can download it from the Artifacts section here: Build URL. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Describe Your Changes
This PR aims to synchronize the latest changes made on the main branch into the development branch.
Changes made
This pull request includes several changes to improve the handling of thread states and response generation in the application. The most important changes include refactoring the state management for generating responses, adding new utility atoms, and updating the related components and tests.
State Management Improvements:
web/helpers/atoms/Thread.atom.ts
: AddedisWaitingForResponseAtom
andisBlockingSendAtom
to manage thread response states more efficiently. Also addedresetThreadWaitingForResponseAtom
andresetGeneratingResponseAtom
for resetting states. [1] [2]Component Updates:
web/screens/Thread/ThreadCenterPanel/ChatBody/index.tsx
: Replaced individual state checks withisBlockingSendAtom
to streamline the logic for blocking sends and scrolling behavior. [1] [2] [3] [4] [5] [6]web/screens/Thread/ThreadCenterPanel/ChatInput/index.tsx
: Updated to useisBlockingSendAtom
instead of individual state checks for blocking sends. [1] [2] [3] [4]web/screens/Thread/ThreadCenterPanel/MessageToolbar/index.tsx
: AddedisBlockingSendAtom
to conditionally enable or disable message actions. [1] [2] [3] [4]Hook Updates:
web/hooks/useCreateNewThread.ts
: Removed unused state management for generating responses. [1] [2]web/hooks/useActiveModel.ts
: Imported new atoms for resetting thread states.web/screens/Thread/ThreadCenterPanel/AssistantSetting/index.tsx
: AddedresetGeneratingResponseAtom
to reset generating states when reloading the model. [1] [2] [3]Test Updates:
web/hooks/useCreateNewThread.test.ts
: Removed redundant assertions related to state management. [1] [2] [3]