Skip to content

Conversation

@Zia-ullah-khan
Copy link
Member

This pull request includes several significant changes to the app/chat/page.tsx file to improve functionality and user experience, as well as the addition of new translations for Pashto and Urdu languages.

Improvements to app/chat/page.tsx:

  • API Integration and Message Syncing:

    • Added constants for various API endpoints and functions to handle API requests, including creating conversations, syncing messages, and sending messages to Discord.
    • Implemented a useEffect hook to periodically sync messages from the server.
  • Message Handling:

    • Updated the sendMessage function to handle asynchronous API calls, ensuring messages are sent to both the server and Discord, and updating the conversation state accordingly.
    • Added a new function sendMessageToAPI to handle sending messages to the server and Discord.
  • UI Enhancements:

    • Modified the message content class to improve readability by changing the background and text colors.
    • Updated the chat interface to display messages with improved styling and added a check for empty message lists.

New Translations:

  • Pashto (translations/ps.yaml):

    • Added complete translations for global terms, backend messages, tutorials, plugins, and about section.
  • Urdu (translations/ur.yaml):

    • Added complete translations for global terms, backend messages, tutorials, plugins, and about section.

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