@@ -3,8 +3,12 @@ import { PluggableList } from 'react-markdown/lib/react-markdown';
33
44import classnames from 'classnames' ;
55
6+ import { useScreenState } from '@/src/hooks/useScreenState' ;
7+
68import { getMappedAttachmentUrl } from '@/src/utils/app/attachments' ;
7- import { convertLaTeXToMarkdownMath } from '@/src/utils/converters' ;
9+ import { convertLaTeXToMarkdownMath } from '@/src/utils/app/converters' ;
10+
11+ import { ScreenState } from '@/src/types/common' ;
812
913import { useAppSelector } from '@/src/store/hooks' ;
1014import { SettingsSelectors } from '@/src/store/settings/settings.reducers' ;
@@ -118,10 +122,13 @@ const ChatMDComponent = ({
118122 const isChatFullWidth = useAppSelector ( UISelectors . selectIsChatFullWidth ) ;
119123 const isOverlay = useAppSelector ( SettingsSelectors . selectIsOverlay ) ;
120124
125+ const screenState = useScreenState ( ) ;
126+
121127 const mdClassNames = classnames (
122- 'prose min-w-full leading-[150%] dark:prose-invert prose-a:text-primary prose-a:underline' ,
128+ 'prose min-w-full dark:prose-invert prose-a:text-primary prose-a:underline' ,
123129 isChatFullWidth && 'max-w-none' ,
124- isOverlay ? 'text-sm' : 'md:leading-normal' ,
130+ isOverlay && 'text-sm' ,
131+ ( screenState === ScreenState . SM || isOverlay ) && 'leading-[150%]' ,
125132 ) ;
126133
127134 const processedContent = convertLaTeXToMarkdownMath ( content ) ;
0 commit comments