diff --git a/src/app/components/Copilot/Copilot.tsx b/src/app/components/Copilot/Copilot.tsx index c568331..6ae9967 100644 --- a/src/app/components/Copilot/Copilot.tsx +++ b/src/app/components/Copilot/Copilot.tsx @@ -46,6 +46,8 @@ export function createNewConversation() { GlobalConversationID = _conversation.id; }) } + + }) } @@ -117,6 +119,22 @@ export function CopilotChat(): React.JSX.Element { setData(event.target.value); }; + // handles the ask button click. + const handleCopilotAskbuttonClick = async (chatInputData, setMessage)=>{ + CopilotStreamController.getInstance().askQGPT({ + query: chatInputData, + setMessage, + }); + setData(""); + } + + // handles the new conversation button click. + const handleNewConversation = async () => { + createNewConversation(); + setMessage("") + setData("") + }; + // for setting the initial copilot chat that takes place on page load. useEffect(() => { const getInitialChat = async () => { @@ -137,7 +155,7 @@ export function CopilotChat(): React.JSX.Element {