Skip to content

Commit

Permalink
Change message preview to first AI message.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnguonly committed Apr 14, 2024
1 parent 038f501 commit 231eddc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ChatBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,15 @@ const ChatBar: React.FC = () => {
// add new chat to chat history
newChatHistory[newChatId] = {
updatedAt: Date.now(),
preview: messages[0].message,
preview: messages[1].message.slice(0, 50),
messages: messages,
};
} else {
// create new chat history in local storage
newChatHistory = {
[newChatId]: {
updatedAt: Date.now(),
preview: messages[0].message,
preview: messages[1].message.slice(0, 50),
messages: messages,
},
};
Expand Down

0 comments on commit 231eddc

Please sign in to comment.