fix: threads sorting order after updated #4319
Merged
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 fixed an issue where threads are sorted incorrectly after updated a certain thread.
Fixes Issues
Changes made
This pull request includes various updates across multiple files to enhance the functionality and maintainability of the project. The most significant changes include modifications to API requests, updates to the model configurations, improvements to the thread handling logic, and adjustments to the theme management.
API Request Updates:
extensions/conversational-extension/src/index.ts
: Updated API requests to include alimit=-1
parameter for fetching threads, messages, and assistant info. [1] [2] [3]extensions/model-extension/src/cortex.ts
: Addedlimit=-1
parameter to thegetModels
API request.Model Configuration:
extensions/inference-openai-extension/resources/models.json
: Added new models "OpenAI GPT 4o-mini" and "OpenAI o1" with their respective configurations.Thread Handling Improvements:
web/helpers/atoms/Thread.atom.ts
: IntroducedcreateNewThreadAtom
to manage the creation of new threads.web/hooks/useCreateNewThread.ts
: Refactored to utilize the newcreateNewThreadAtom
for thread creation. [1] [2]web/hooks/useDeleteThread.ts
: Updated the thread deletion logic to handle messages and modify threads instead of deleting them outright. [1] [2]Theme Management:
web/hooks/useLoadTheme.ts
: RemovedjanThemesPathAtom
and refactored theme application logic into a separateapplyTheme
function. [1] [2] [3] [4] [5] [6]Miscellaneous:
web/containers/ModelDropdown/index.tsx
: Updated placeholder text to "Select a model".web/hooks/useThreads.ts
: Sorted threads byupdated_at
metadata.web/package.json
: Bumped version from 0.5.11 to 0.5.12.