Skip to content

Commit

Permalink
feat: first question response handling
Browse files Browse the repository at this point in the history
  • Loading branch information
VishalPawar1010 committed Jul 25, 2024
1 parent ba76567 commit c946361
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/components/Copilot/Copilot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,12 @@ export function CopilotChat(): React.JSX.Element {
conversationId: selectedId,
includeRawMessages: true,
});
// console.log("getMessages === ",rawMessages);
console.log("getMessages === ",rawMessages);
if (rawMessages.length>1) {
setMessage(rawMessages[1].message)
if(rawMessages[1].isUserMessage){
setMessage(rawMessages[2].message)
}
else setMessage(rawMessages[1].message)
}
else setMessage("No previous conversation history, please ask the question below.");
} catch (error) {
Expand Down

0 comments on commit c946361

Please sign in to comment.