diff --git a/client/cody-ui/src/Chat.tsx b/client/cody-ui/src/Chat.tsx index 2f850a2ac2f..90ec98bf78d 100644 --- a/client/cody-ui/src/Chat.tsx +++ b/client/cody-ui/src/Chat.tsx @@ -41,8 +41,10 @@ interface ChatProps extends ChatClassNames { setSuggestions?: (suggestions: undefined | []) => void needsEmailVerification?: boolean needsEmailVerificationNotice?: React.FunctionComponent + codyNotEnabledNotice?: React.FunctionComponent abortMessageInProgressComponent?: React.FunctionComponent<{ onAbortMessageInProgress: () => void }> onAbortMessageInProgress?: () => void + isCodyEnabled: boolean } interface ChatClassNames extends TranscriptItemClassNames { @@ -127,11 +129,13 @@ export const Chat: React.FunctionComponent = ({ suggestions, setSuggestions, needsEmailVerification = false, + codyNotEnabledNotice: CodyNotEnabledNotice, needsEmailVerificationNotice: NeedsEmailVerificationNotice, contextStatusComponent: ContextStatusComponent, contextStatusComponentProps = {}, abortMessageInProgressComponent, onAbortMessageInProgress, + isCodyEnabled, }) => { const [inputRows, setInputRows] = useState(5) const [historyIndex, setHistoryIndex] = useState(inputHistory.length) @@ -232,7 +236,11 @@ export const Chat: React.FunctionComponent = ({ return (
- {needsEmailVerification && NeedsEmailVerificationNotice ? ( + {!isCodyEnabled && CodyNotEnabledNotice ? ( +
+ +
+ ) : needsEmailVerification && NeedsEmailVerificationNotice ? (
@@ -281,17 +289,17 @@ export const Chat: React.FunctionComponent = ({