fix: generating message is gone after switching to another thread #4321
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
Fixed an issue where generating message disappear after switching to another thread then go back.
Fixes Issues
##Changes made
This pull request includes multiple changes across various files to enhance functionality and improve code quality. The most important changes include adding new parameters to API requests, updating thread management, and modifying theme handling.
API Request Enhancements:
extensions/conversational-extension/src/index.ts
: Addedlimit=-1
parameter to thelistThreads
,listMessages
, andgetThreadAssistant
methods to fetch all items without pagination. [1] [2] [3]extensions/model-extension/src/cortex.ts
: Addedlimit=-1
parameter to thegetModels
method to fetch all models without pagination.Thread Management Updates:
web/helpers/atoms/Thread.atom.ts
: IntroducedcreateNewThreadAtom
for creating new threads and updatedupdateThreadAtom
to sort threads based onupdated_at
metadata. [1] [2]web/hooks/useCreateNewThread.ts
: Removed redundantcreateNewThreadAtom
definition and updated thread creation to includeupdated_at
metadata. [1] [2]web/hooks/useDeleteThread.ts
: Refactored thread deletion logic to delete messages individually and update thread metadata instead of deleting the entire thread. [1] [2]Theme Handling Improvements:
web/hooks/useLoadTheme.ts
: RemovedjanThemesPathAtom
and refactored theme application logic into a newapplyTheme
function for better modularity and readability. [1] [2] [3] [4] [5] [6]These changes aim to improve the efficiency of API calls, enhance thread management, and streamline theme handling within the application.