Add Custom OpenAI Embedding model, better statuses, system theme, fix copying, other bug fixes #851
+350
−68
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 introduces improved logging and user feedback for model selection and chat/embedding operations, as well as enhanced status reporting in the chat UI. The changes make it easier to debug model usage and provide clearer feedback to users regarding the current state of chat requests and errors. Additionally, the chat UI now displays real-time status messages and handles error states more gracefully.
Backend improvements:
Model selection and operation logging:
src/app/api/chat/route.ts,src/app/api/search/route.ts, andsrc/app/api/uploads/route.ts. This includes logging provider/model names and method calls for both chat and embedding models using JavaScript proxies. [1] [2] [3] [4] [5] [6] [7]Error handling and status streaming:
Frontend improvements:
Chat UI status reporting:
statusTextstate toChatWindowand passed it through toChatandMessageBoxLoadingcomponents, enabling real-time display of status messages (e.g., "Searching web...", "Generating answer...", "Chat completion failed."). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Miscellaneous:
'use client';directive tosrc/components/MessageActions/Copy.tsxfor proper client-side rendering.DevOps / Docker:
entrypoint.shuses Unix line endings and changed the command invocation to use/bin/shfor better compatibility.