Skip to content

Commit

Permalink
small changes for additional demo use cases
Browse files Browse the repository at this point in the history
  • Loading branch information
faxg committed Dec 3, 2024
1 parent 6fb3b64 commit b44518c
Show file tree
Hide file tree
Showing 21 changed files with 1,400 additions and 20 deletions.
9 changes: 9 additions & 0 deletions app/frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { initializeIcons } from "@fluentui/react";
import "./index.css";

import Chat from "./pages/chat/Chat";

import LayoutWrapper from "./layoutWrapper";
import i18next from "./i18n/config";

Expand All @@ -26,6 +27,14 @@ const router = createHashRouter([
path: "qa",
lazy: () => import("./pages/ask/Ask")
},
{
path: "research",
lazy: () => import("./pages/research/Research")
},
{
path: "rotstift",
lazy: () => import("./pages/rotstift/Rotstift")
},
{
path: "*",
lazy: () => import("./pages/NoPage")
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/src/locales/da/translation.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pageTitle": "Azure OpenAI + AI Search",
"headerTitle": "Azure OpenAI + AI Search",
"pageTitle": "Swiss Education Assistant Demo",
"headerTitle": "Swiss Education Assistant Demo",
"chat": "Chat",
"qa": "Stil et spørgsmål",
"login": "Log ind",
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/locales/de/translation.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"pageTitle": "Azure OpenAI + AI Search",
"pageTitle": "Swiss Education Assistant Demo",
"headerTitle": "Azure OpenAI + AI Suche",
"chat": "Chat",
"qa": "Eine Frage stellen",
Expand Down
12 changes: 6 additions & 6 deletions app/frontend/src/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pageTitle": "Azure OpenAI + AI Search",
"headerTitle": "Azure OpenAI + AI Search",
"pageTitle": "Swiss Education Assistant Demo",
"headerTitle": "Swiss Education Assistant Demo",
"chat": "Chat",
"qa": "Ask a question",
"login": "Login",
Expand Down Expand Up @@ -37,10 +37,10 @@
"chatEmptyStateTitle": "Chat with your data",
"chatEmptyStateSubtitle": "Ask anything or try an example",
"defaultExamples": {
"1": "What is included in my Northwind Health Plus plan that is not in standard?",
"2": "What happens in a performance review?",
"3": "What does a Product Manager do?",
"placeholder": "Type a new question (e.g. does my plan cover annual eye exams?)"
"1": "What is special about the Swiss education system compared to international standards?",
"2": "Tell me about BCRA1 und what implications it has for cancer treatment.",
"3": "Can IT workloads that handle sensitive personal data be used in the Azure Cloud in Switzerland ?",
"placeholder": "Type a new question (e.g. can you explain the Swiss higher education system in detail?)"
},
"askTitle": "Ask your data",
"gpt4vExamples": {
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/src/locales/es/translation.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pageTitle": "Azure OpenAI + AI Search",
"headerTitle": "Azure OpenAI + AI Search",
"pageTitle": "Swiss Education Assistant Demo",
"headerTitle": "Swiss Education Assistant Demo",
"chat": "Chat",
"qa": "Haz una pregunta",
"login": "Iniciar sesión",
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/src/locales/fr/translation.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pageTitle": "Azure OpenAI + AI Search",
"headerTitle": "Azure OpenAI + AI Search",
"pageTitle": "Swiss Education Assistant Demo",
"headerTitle": "Swiss Education Assistant Demo",
"chat": "Chat",
"qa": "Posez une question",
"login": "Connexion",
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/src/locales/ja/translation.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pageTitle": "Azure OpenAI + AI Search",
"headerTitle": "Azure OpenAI + AI Search",
"pageTitle": "Swiss Education Assistant Demo",
"headerTitle": "Swiss Education Assistant Demo",
"chat": "チャット",
"qa": "一問一答",
"login": "ログイン",
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/src/locales/nl/translation.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pageTitle": "Azure OpenAI + AI Search",
"headerTitle": "Azure OpenAI + AI Search",
"pageTitle": "Swiss Education Assistant Demo",
"headerTitle": "Swiss Education Assistant Demo",
"chat": "Chat",
"qa": "Stel een vraag",
"login": "Inloggen",
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/src/locales/ptBR/translation.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pageTitle": "Azure OpenAI + AI Search",
"headerTitle": "Azure OpenAI + AI Search",
"pageTitle": "Swiss Education Assistant Demo",
"headerTitle": "Swiss Education Assistant Demo",
"chat": "Chat",
"qa": "Faça uma pergunta",
"login": "Entrar",
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/pages/layout/Layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

.headerNavPageLink {
border-bottom: none;
padding: 0;
padding: 20px;
display: block;
}

Expand Down
18 changes: 18 additions & 0 deletions app/frontend/src/pages/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,24 @@ const Layout = () => {
{t("qa")}
</NavLink>
</li>
<li>
<NavLink
to="/research"
className={({ isActive }) => (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)}
onClick={() => setMenuOpen(false)}
>
{t("Research Assistant")}
</NavLink>
</li>
<li>
<NavLink
to="/rotstift"
className={({ isActive }) => (isActive ? styles.headerNavPageLinkActive : styles.headerNavPageLink)}
onClick={() => setMenuOpen(false)}
>
{t("Rotstift")}
</NavLink>
</li>
</ul>
</nav>
<div className={styles.loginMenuContainer}>
Expand Down
146 changes: 146 additions & 0 deletions app/frontend/src/pages/research/Research.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
.container {
flex: 1;
display: flex;
flex-direction: column;
margin-top: 1rem;
}

.chatRoot {
flex: 1;
display: flex;
}

.chatContainer {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
max-height: calc(100vh - 10rem);
}

.chatEmptyState {
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
max-height: 64rem;
padding-top: 1rem;
}

.chatEmptyStateTitle {
font-size: 2.75rem;
font-weight: 600;
margin-top: 0;
margin-bottom: 1.875rem;
}

.chatEmptyStateSubtitle {
font-weight: 600;
margin-bottom: 0.625rem;
}

.chatMessageStream {
flex-grow: 1;
max-height: 64rem;
width: 100%;
overflow-y: auto;
padding: 0 2rem;
display: flex;
flex-direction: column;
resize: horizontal;
min-width: 50vw;
}

.chatMessageGpt {
margin-bottom: 1.25rem;
max-width: 100%;
display: flex;
}

.chatMessageGptMinWidth {
max-width: 31.25rem;
margin-bottom: 1.25rem;
}

.chatInput {
position: sticky;
bottom: 0;
flex: 0 0 6.25rem;
padding: 1rem;
width: 100%;
max-width: 64.25rem;
background: #f2f2f2;
}

.chatAnalysisPanel {
flex: 1;
overflow-y: auto;
max-height: 85vh;
margin-left: 1.25rem;
margin-right: 1.25rem;
}

.chatSettingsSeparator {
display: flex;
flex-direction: column;
margin-top: 0.9375rem;
}

.loadingLogo {
font-size: 1.75rem;
}

.commandsSplitContainer {
display: flex;
justify-content: space-between;
}

.commandsContainer {
display: flex;
padding-left: 1rem;
padding-right: 1rem;
align-self: flex-end;
}

.commandButton {
margin-bottom: 1.25rem;
}

@media (min-width: 992px) {
.container {
margin-top: 1.25rem;
}

.chatEmptyState {
padding-top: 3.75rem;
}

.chatEmptyStateTitle {
font-size: 4rem;
}

.chatInput {
padding: 0.75rem 1.5rem 1.5rem;
}

.commandsSplitContainer {
padding-left: 1rem;
}

.commandsContainer {
padding-left: 0rem;
padding-right: 0rem;
}

.commandButton {
margin-right: 1.25rem;
margin-bottom: 1.25rem;
}

.chatMessageGpt {
max-width: 80%;
min-width: 31.25rem;
}
}
Loading

0 comments on commit b44518c

Please sign in to comment.