-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'PSL-8488-UT-ANSWERS' of https://github.com/Azure-Sample…
…s/chat-with-your-data-solution-accelerator into PSL-8488-UT-ANSWERS
- Loading branch information
Showing
21 changed files
with
1,640 additions
and
987 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
code/frontend/src/components/AssistantTypeSection/AssistantTypeSection.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.chatEmptyState { | ||
flex-grow: 1; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.chatIcon { | ||
height: 62px; | ||
width: 62px; | ||
} | ||
|
||
.chatEmptyStateTitle { | ||
font-family: "Segoe UI"; | ||
font-style: normal; | ||
font-weight: 700; | ||
font-size: 36px; | ||
display: flex; | ||
align-items: flex-end; | ||
text-align: center; | ||
margin-top: 24px; | ||
margin-bottom: 0px; | ||
} | ||
|
||
.chatEmptyStateSubtitle { | ||
margin-top: 16px; | ||
font-family: "Segoe UI"; | ||
font-style: normal; | ||
font-weight: 600; | ||
font-size: 16px; | ||
line-height: 150%; | ||
display: flex; | ||
align-items: flex-end; | ||
text-align: center; | ||
letter-spacing: -0.01em; | ||
color: #616161; | ||
} | ||
|
||
.dataText { | ||
background: linear-gradient(90deg, #464FEB 10.42%, #8330E9 100%); | ||
color: transparent; | ||
background-clip: text; | ||
} | ||
|
||
.loadingContainer { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100vh; /* Full viewport height */ | ||
} | ||
|
||
.loadingIcon { | ||
border: 8px solid #f3f3f3; /* Light grey */ | ||
border-top: 8px solid #3498db; /* Blue */ | ||
border-radius: 50%; | ||
width: 50px; | ||
height: 50px; | ||
animation: spin 1s linear infinite; | ||
} |
56 changes: 56 additions & 0 deletions
56
code/frontend/src/components/AssistantTypeSection/AssistantTypeSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React from "react"; | ||
import { Stack } from "@fluentui/react"; | ||
import Azure from "../../assets/Azure.svg"; | ||
import Cards from "../../pages/chat/Cards_contract/Cards"; | ||
import styles from "./AssistantTypeSection.module.css"; | ||
|
||
type AssistantTypeSectionProps = { | ||
assistantType: string; | ||
isAssistantAPILoading: boolean; | ||
}; | ||
|
||
enum assistantTypes { | ||
default = "default", | ||
contractAssistant = "contract assistant", | ||
} | ||
|
||
export const AssistantTypeSection: React.FC<AssistantTypeSectionProps> = ({ | ||
assistantType, | ||
isAssistantAPILoading, | ||
}) => { | ||
return ( | ||
<Stack className={styles.chatEmptyState}> | ||
<img | ||
src={Azure} | ||
className={styles.chatIcon} | ||
aria-hidden="true" | ||
alt="Chat with your data" | ||
/> | ||
{assistantType === assistantTypes.contractAssistant ? ( | ||
<> | ||
<h1 className={styles.chatEmptyStateTitle}>Contract Summarizer</h1> | ||
<h2 className={styles.chatEmptyStateSubtitle}> | ||
AI-Powered assistant for simplified summarization | ||
</h2> | ||
<Cards /> | ||
</> | ||
) : assistantType === assistantTypes.default ? ( | ||
<> | ||
<h1 className={styles.chatEmptyStateTitle}> | ||
Chat with your | ||
<span className={styles.dataText}> Data</span> | ||
</h1> | ||
<h2 className={styles.chatEmptyStateSubtitle}> | ||
This chatbot is configured to answer your questions | ||
</h2> | ||
</> | ||
) : null} | ||
{isAssistantAPILoading && ( | ||
<div className={styles.loadingContainer}> | ||
<div className={styles.loadingIcon}></div> | ||
<p>Loading...</p> | ||
</div> | ||
)} | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.