docs: add AI Assistant (#5249)
* added components * added ai assistant button * change styling * improve AI assistant * change to a drawer * added command support into search * add AiAssistant to all projects * remove usage of Text component * added error handling * use recaptcha * fix new configurations * fix background color * change suggested questions
This commit is contained in:
@@ -18,7 +18,16 @@ export const CodeMdx = ({ className, children }: CodeMdxProps) => {
|
||||
const match = /language-(\w+)/.exec(className || "")
|
||||
|
||||
if (match) {
|
||||
return <CodeBlock source={children as string} lang={match[1]} />
|
||||
return (
|
||||
<CodeBlock
|
||||
source={
|
||||
Array.isArray(children)
|
||||
? (children[0] as string)
|
||||
: (children as string)
|
||||
}
|
||||
lang={match[1]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return <InlineCode>{children}</InlineCode>
|
||||
|
||||
Reference in New Issue
Block a user