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

FS-96 Start new chat #24

Merged
merged 1 commit into from
Nov 14, 2024
Merged

FS-96 Start new chat #24

merged 1 commit into from
Nov 14, 2024

Conversation

mic-smith
Copy link
Collaborator

Description

Implements the "Start new chat" button in nav bar to reset the UI and session data to an empty chat.

Changelog

  • Delete /chat endpoint added to clear chat session and uploaded files
  • Refactored suggestions to be on useMessages hook so can be reset with messages
  • Prevent fetching suggestions after healthcheck message

waiting: boolean;
}

export const useMessages = (): UseMessagesHook => {
const [waiting, setWaiting] = useState<boolean>(false);
const [messages, setMessages] = useState<Message[]>([starterMessage]);
const [suggestions, setSuggestions] = useState<string[]>([]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I like this change

Copy link
Collaborator

@IMladjenovic IMladjenovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, checked out the code and works as expected!

@mic-smith mic-smith merged commit fae22d3 into main Nov 14, 2024
4 checks passed
@mic-smith mic-smith deleted the FS-96/start-new-chat branch November 14, 2024 16:03
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.

3 participants