feat: stream流响应
This commit is contained in:
@@ -369,7 +369,7 @@
|
||||
}
|
||||
|
||||
pre code {
|
||||
background-color: #222;
|
||||
background-color: #222 !important;
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
font-family: 'Söhne,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Helvetica Neue,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji';
|
||||
|
||||
@@ -26,8 +26,8 @@ const Markdown = ({ source, isChatting }: { source: string; isChatting: boolean
|
||||
code({ node, inline, className, children, ...props }) {
|
||||
const match = /language-(\w+)/.exec(className || '');
|
||||
const code = String(children).replace(/\n$/, '');
|
||||
return !inline ? (
|
||||
<Box my={3} borderRadius={'md'} overflow={'hidden'}>
|
||||
return !inline || match ? (
|
||||
<Box my={3} borderRadius={'md'} overflow={'hidden'} backgroundColor={'#222'}>
|
||||
<Flex
|
||||
py={2}
|
||||
px={5}
|
||||
|
||||
Reference in New Issue
Block a user