{showAuthMessage ? ( - +

Authentication Not Configured

- This app does not have authentication configured. Please add an identity provider by finding your app in the + This app does not have authentication configured. Please add an identity provider by finding your app in the Azure Portal - and following - these instructions. + and following + these instructions.

-

Authentication configuration takes a few minutes to apply.

-

If you deployed in the last 10 minutes, please wait and reload the page after 10 minutes.

+

Authentication configuration takes a few minutes to apply.

+

If you deployed in the last 10 minutes, please wait and reload the page after 10 minutes.

) : ( @@ -586,7 +586,7 @@ const Chat = () => { {!messages || messages.length < 1 ? ( @@ -594,7 +594,7 @@ const Chat = () => {

This chatbot is configured to answer your questions

) : ( -
+
{messages.map((answer, index) => ( <> {answer.role === "user" ? ( @@ -612,7 +612,7 @@ const Chat = () => { />
: answer.role === ERROR ?
- + Error {answer.content} @@ -639,7 +639,7 @@ const Chat = () => { {isLoading && ( - { tabIndex={0} onClick={stopGenerating} onKeyDown={e => e.key === "Enter" || e.key === " " ? stopGenerating() : null} - > - )} {appStateContext?.state.isCosmosDBAvailable?.status !== CosmosDBStatus.NotConfigured && { />} {
{/* Citation Panel */} - {messages && messages.length > 0 && isCitationPanelOpen && activeCitation && ( - - - Citations - setIsCitationPanelOpen(false)}/> - -
onViewSource(activeCitation)}>{activeCitation.title}
-
- -
-
- )} - {(appStateContext?.state.isChatHistoryOpen && appStateContext?.state.isCosmosDBAvailable?.status !== CosmosDBStatus.NotConfigured) && } + {messages && messages.length > 0 && isCitationPanelOpen && activeCitation && ( + + + Citations + setIsCitationPanelOpen(false)} /> + +
onViewSource(activeCitation)}>{activeCitation.title}
+
+ +
+
+ )} + {(appStateContext?.state.isChatHistoryOpen && appStateContext?.state.isCosmosDBAvailable?.status !== CosmosDBStatus.NotConfigured) && } )}
diff --git a/frontend/src/pages/layout/Layout.tsx b/frontend/src/pages/layout/Layout.tsx index 8a7789f812..4b813ee8c1 100644 --- a/frontend/src/pages/layout/Layout.tsx +++ b/frontend/src/pages/layout/Layout.tsx @@ -1,38 +1,13 @@ import { Outlet, Link } from "react-router-dom"; import styles from "./Layout.module.css"; -import Azure from "../../assets/Azure.svg"; +import Contoso from "../../assets/Contoso.svg"; import { CopyRegular, ShareRegular } from "@fluentui/react-icons"; -import { CommandBarButton, Dialog, Stack, TextField, ICommandBarStyles, IButtonStyles, DefaultButton } from "@fluentui/react"; +import { Dialog, Stack, TextField, ICommandBarStyles, IButtonStyles } from "@fluentui/react"; import { useContext, useEffect, useState } from "react"; import { HistoryButton, ShareButton } from "../../components/common/Button"; import { AppStateContext } from "../../state/AppProvider"; import { CosmosDBStatus } from "../../api"; -const shareButtonStyles: ICommandBarStyles & IButtonStyles = { - root: { - width: 86, - height: 32, - borderRadius: 4, - background: 'radial-gradient(109.81% 107.82% at 100.1% 90.19%, #0F6CBD 33.63%, #2D87C3 70.31%, #8DDDD8 100%)', - // position: 'absolute', - // right: 20, - padding: '5px 12px', - marginRight: '20px' - }, - icon: { - color: '#FFFFFF', - }, - rootHovered: { - background: 'linear-gradient(135deg, #0F6CBD 0%, #2D87C3 51.04%, #8DDDD8 100%)', - }, - label: { - fontWeight: 600, - fontSize: 14, - lineHeight: '20px', - color: '#FFFFFF', - }, - }; - const Layout = () => { const [isSharePanelOpen, setIsSharePanelOpen] = useState(false); const [copyClicked, setCopyClicked] = useState(false); @@ -64,64 +39,62 @@ const Layout = () => { } }, [copyClicked]); - useEffect(() => {}, [appStateContext?.state.isCosmosDBAvailable.status]); + useEffect(() => { }, [appStateContext?.state.isCosmosDBAvailable.status]); return (
- + -

Azure AI

+

Contoso

- {(appStateContext?.state.isCosmosDBAvailable?.status !== CosmosDBStatus.NotConfigured) && - - } - + {(appStateContext?.state.isCosmosDBAvailable?.status !== CosmosDBStatus.NotConfigured) && + + } +
-