mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
Blocks: reduce ABR usage.
This commit is contained in:
@@ -2,7 +2,7 @@ import * as React from 'react';
|
||||
|
||||
import { Card } from '@mui/joy';
|
||||
|
||||
import { AutoBlocksRenderer } from '~/modules/blocks/AutoBlocksRenderer';
|
||||
import { ScaledTextBlockRenderer } from '~/modules/blocks/ScaledTextBlockRenderer';
|
||||
|
||||
import { useIsMobile } from '~/common/components/useMatchMedia';
|
||||
import { useUIContentScaling } from '~/common/state/store-ui';
|
||||
@@ -49,14 +49,7 @@ export function ZeroGallery(props: { domain: 'draw' | 'app' }) {
|
||||
{/* {Brand.Title.Base} No Images */}
|
||||
{/*</Typography>*/}
|
||||
{/*<Typography level='title-sm' sx={{ whiteSpace: 'balance' }}>*/}
|
||||
<AutoBlocksRenderer
|
||||
text={text}
|
||||
fromRole='assistant'
|
||||
contentScaling={contentScaling}
|
||||
fitScreen={isMobile}
|
||||
isMobile={isMobile}
|
||||
textRenderVariant='markdown'
|
||||
/>
|
||||
<ScaledTextBlockRenderer text={text} contentScaling={contentScaling} textRenderVariant='markdown' />
|
||||
{/*</Typography>*/}
|
||||
</Card>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import { AutoBlocksRenderer } from '~/modules/blocks/AutoBlocksRenderer';
|
||||
import { ScaledTextBlockRenderer } from '~/modules/blocks/ScaledTextBlockRenderer';
|
||||
|
||||
import { GoodModal } from '~/common/components/modals/GoodModal';
|
||||
import { platformAwareKeystrokes } from '~/common/components/KeyStroke';
|
||||
@@ -49,12 +49,9 @@ export function ShortcutsModal(props: { onClose: () => void }) {
|
||||
|
||||
return (
|
||||
<GoodModal open title='Desktop Shortcuts' onClose={props.onClose}>
|
||||
<AutoBlocksRenderer
|
||||
<ScaledTextBlockRenderer
|
||||
text={shortcutsMd}
|
||||
fromRole='assistant'
|
||||
contentScaling={contentScaling}
|
||||
fitScreen={isMobile}
|
||||
isMobile={isMobile}
|
||||
textRenderVariant='markdown'
|
||||
/>
|
||||
</GoodModal>
|
||||
|
||||
@@ -8,7 +8,7 @@ import ArrowForwardRoundedIcon from '@mui/icons-material/ArrowForwardRounded';
|
||||
import CheckRoundedIcon from '@mui/icons-material/CheckRounded';
|
||||
import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownRounded';
|
||||
|
||||
import { AutoBlocksRenderer } from '~/modules/blocks/AutoBlocksRenderer';
|
||||
import { ScaledTextBlockRenderer } from '~/modules/blocks/ScaledTextBlockRenderer';
|
||||
|
||||
import { AgiSquircleIcon } from '~/common/components/icons/AgiSquircleIcon';
|
||||
import { ChatBeamIcon } from '~/common/components/icons/ChatBeamIcon';
|
||||
@@ -231,12 +231,9 @@ export function ExplainerCarousel(props: {
|
||||
'--color-canvas-default': 'transparent!important',
|
||||
},
|
||||
}}>
|
||||
<AutoBlocksRenderer
|
||||
<ScaledTextBlockRenderer
|
||||
text={mdText}
|
||||
fromRole='assistant'
|
||||
contentScaling={contentScaling /* was: 'md' */}
|
||||
fitScreen={isMobile}
|
||||
isMobile={isMobile}
|
||||
textRenderVariant='markdown'
|
||||
/>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user