File tree Expand file tree Collapse file tree 2 files changed +8
-17
lines changed
enjoy/src/renderer/components/messages Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ export const AssistantMessageComponent = (props: {
183
183
184
184
{ configuration . type === "gpt" && (
185
185
< MarkdownWrapper
186
- className = "message-content select-text prose dark:prose-invert"
186
+ className = "message-content select-text prose dark:prose-invert max-w-full "
187
187
data-source-type = "Message"
188
188
data-source-id = { message . id }
189
189
>
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ import {
19
19
DropdownMenuSeparator ,
20
20
toast ,
21
21
} from "@renderer/components/ui" ;
22
- import { SpeechPlayer , ConversationShortcuts } from "@renderer/components" ;
22
+ import {
23
+ SpeechPlayer ,
24
+ ConversationShortcuts ,
25
+ MarkdownWrapper ,
26
+ } from "@renderer/components" ;
23
27
import { useContext , useState } from "react" ;
24
28
import { AppSettingsProviderContext } from "@renderer/context" ;
25
29
import {
@@ -93,22 +97,9 @@ export const UserMessageComponent = (props: {
93
97
</ Avatar >
94
98
</ div >
95
99
< div className = "flex flex-col gap-2 px-4 py-2 bg-sky-500/30 border-sky-500 rounded-lg shadow-sm w-full mb-2" >
96
- < Markdown
97
- className = "select-text prose dark:prose-invert"
98
- components = { {
99
- a ( { node, children, ...props } ) {
100
- try {
101
- new URL ( props . href ?? "" ) ;
102
- props . target = "_blank" ;
103
- props . rel = "noopener noreferrer" ;
104
- } catch ( e ) { }
105
-
106
- return < a { ...props } > { children } </ a > ;
107
- } ,
108
- } }
109
- >
100
+ < MarkdownWrapper className = "message-content select-text prose dark:prose-invert max-w-full" >
110
101
{ message . content }
111
- </ Markdown >
102
+ </ MarkdownWrapper >
112
103
113
104
{ Boolean ( speech ) && < SpeechPlayer speech = { speech } /> }
114
105
You can’t perform that action at this time.
0 commit comments