Skip to content

Conversation

@jakepresent
Copy link

@jakepresent jakepresent commented Aug 16, 2025

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:

  • Added detailed logging for chat and embedding model selection and API calls in src/app/api/chat/route.ts, src/app/api/search/route.ts, and src/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]
  • Added initial status messages to the chat response stream to inform the UI about the current request state (e.g., "Waiting for chat completion..." or "Searching web...").

Error handling and status streaming:

  • Improved error handling in the chat API to emit a status message when chat completion fails, and updated stream event handlers to support status updates. [1] [2] [3]

Frontend improvements:

Chat UI status reporting:

  • Added statusText state to ChatWindow and passed it through to Chat and MessageBoxLoading components, 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:

  • Added 'use client'; directive to src/components/MessageActions/Copy.tsx for proper client-side rendering.

DevOps / Docker:

  • Updated Dockerfile to ensure entrypoint.sh uses Unix line endings and changed the command invocation to use /bin/sh for better compatibility.

jakepresent and others added 3 commits August 16, 2025 13:10
@jakepresent jakepresent changed the title Fix various bugs Add Custom OpenAI Embedding model, better statuses, system theme, other bug fixes Aug 16, 2025
@jakepresent jakepresent changed the title Add Custom OpenAI Embedding model, better statuses, system theme, other bug fixes Add Custom OpenAI Embedding model, better statuses, system theme, fix copying, other bug fixes Aug 16, 2025
@ItzCrazyKns ItzCrazyKns self-requested a review August 17, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant