-
Notifications
You must be signed in to change notification settings - Fork 53
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
Update Copilot.tsx #85
base: main
Are you sure you want to change the base?
Conversation
These enables users to preview and reference previous chat messages easily by fetching the names of previous chats and allowing users to select a chat from the list. Once a chat is selected, the code fetches and displays the messages of the selected chat, allowing users to review and refer to earlier parts of the conversation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking great, going to test really quick before merging but then should be good. looks great from this end
@@ -113,6 +113,9 @@ export function CopilotChat(): React.JSX.Element { | |||
const [chatSelected, setChatSelected] = useState('-- no chat selected --'); | |||
const [chatInputData, setData] = useState(''); | |||
const [message, setMessage] = useState<string>(''); | |||
const [chats, setChats] = useState<string[]>([]); // State variable to store chat names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
Looks like there is a bit of visual challenge here, would you mind looking into this? @RohanMishra315 |
// Function to handle chat selection | ||
const handleChatSelection = (index: number) => { | ||
setCurrentChatIndex(index); | ||
setChatSelected(chats[index]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like this is working properly, but we need to do a little bit of work to the UI so that all of the other chats are are not showing with buttons as well. let me know what you are able to find 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,I'll look into that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend just making the top bar that shows all the conversations scrollable. Set a max width and then allow a user to scroll horizontally 👍
Hey @RohanMishra315 could I get an update from you on the status of this pr? |
PULL REQUEST
DESCRIPTION
These enables users to preview and reference previous chat messages easily by fetching the names of previous chats and allowing users to select a chat from the list. Once a chat is selected, the code fetches and displays the messages of the selected chat, allowing users to review and refer to earlier parts of the conversation.
CHANGES MADE
This PR fixes ##59