Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Start a new chat #484

Merged
merged 2 commits into from
Dec 10, 2024
Merged

feat: Start a new chat #484

merged 2 commits into from
Dec 10, 2024

Conversation

530051970
Copy link
Collaborator

@530051970 530051970 commented Dec 10, 2024

Fixes #

  1. Start a new chat
  2. Clear all localStorage when user is logging out
  3. When using a Chinese input method, pressing Enter to confirm triggers message sending
🤖 AI-Generated PR Description (Powered by Amazon Bedrock)

Description

This pull request includes modifications to various files related to the chatbot feature. The changes primarily involve updating the styling, layout, and localization of the chatbot component. Additionally, there are minor updates to utility functions and constants.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

File Stats Summary

File number involved in this PR: 6, unfold to see the details:

The file changes summary is as follows:

Files
Changes
Change Summary
source/portal/src/locale/en.json 3 added, 1 removed The code changes add a description for the chat section, and introduce a new button labeled "Start a new chat" in the user interface.
source/portal/src/locale/zh.json 3 added, 1 removed This code change adds a new string "chatDescription" to provide a description for the chat feature, and a new string "startNewChat" for a button to start a new conversation with the chatbot.
source/portal/src/index.scss 5 added, 2 removed The code changes modify the height calculation for the chat container layout and message list, and add a new class '.chat-container-layout' for better organization.
source/portal/src/utils/const.ts 10 added, 0 removed The code changes introduce new constants for configuration options related to the current chatbot, chat history usage, tracing, RAG tool usage, scenario, model selection, max token, temperature, and additional settings.
source/portal/src/pages/chatbot/ChatBot.tsx 201 added, 163 removed The code changes include adding new imports like Container, ContentLayout, Header, and some constants. It also adds a new state variable isComposing to track text composition events. The main UI changes are adding a header with a "Start New Chat" button, breadcrumbs, and moving the model settings into the footer section. Additionally, it adds event listeners for text composition to improve input handling.
source/portal/src/layout/CommonLayout.tsx 17 added, 0 removed The code changes add several new constants related to additional settings, chat history, tracing, tools, scenarios, model options, max tokens, and temperature. It also adds a function to clear the local storage for these keys and calls this function during the sign-out process.

@530051970 530051970 requested a review from NingLu December 10, 2024 08:30
@NingLu NingLu merged commit f30fd2e into dev Dec 10, 2024
6 checks passed
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.

2 participants