File tree Expand file tree Collapse file tree 1 file changed +19
-9
lines changed
src/components/Common/Playground Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -91,14 +91,24 @@ export const PlaygroundUserMessageBubble: React.FC<Props> = (props) => {
91
91
) ) }
92
92
</ div >
93
93
) }
94
- < div
95
- dir = "auto"
96
- className = { `message-bubble bg-gray-50 dark:bg-[#242424] rounded-3xl prose dark:prose-invert break-words text-primary min-h-7 prose-p:opacity-95 prose-strong:opacity-100 bg-foreground border border-input-border max-w-[100%] sm:max-w-[90%] px-4 py-2.5 rounded-br-lg dark:border-[#2D2D2D] ${
97
- props . message_type && ! editMode ? "italic" : ""
98
- } `} >
99
- { ! editMode ? (
94
+
95
+ { ! editMode && props ?. message ?. length > 0 && (
96
+ < div
97
+ dir = "auto"
98
+ data-is-not-editable = { ! editMode }
99
+ className = { `message-bubble bg-gray-50 dark:bg-[#242424] rounded-3xl prose dark:prose-invert break-words text-primary min-h-7 prose-p:opacity-95 prose-strong:opacity-100 bg-foreground border border-input-border max-w-[100%] sm:max-w-[90%] px-4 py-2.5 rounded-br-lg dark:border-[#2D2D2D] ${
100
+ props . message_type && ! editMode ? "italic" : ""
101
+ } `} >
100
102
< HumanMessage message = { props . message } />
101
- ) : (
103
+ </ div >
104
+ ) }
105
+
106
+ { editMode && (
107
+ < div
108
+ dir = "auto"
109
+ className = { `message-bubble bg-gray-50 dark:bg-[#242424] rounded-3xl prose dark:prose-invert break-words text-primary min-h-7 prose-p:opacity-95 prose-strong:opacity-100 bg-foreground border border-input-border max-w-[100%] sm:max-w-[90%] px-4 py-2.5 rounded-br-lg dark:border-[#2D2D2D] ${
110
+ props . message_type && ! editMode ? "italic" : ""
111
+ } `} >
102
112
< div className = "w-screen max-w-[100%]" >
103
113
< EditMessageForm
104
114
value = { props . message }
@@ -107,8 +117,8 @@ export const PlaygroundUserMessageBubble: React.FC<Props> = (props) => {
107
117
isBot = { props . isBot }
108
118
/>
109
119
</ div >
110
- ) }
111
- </ div >
120
+ </ div >
121
+ ) }
112
122
113
123
{ props . images &&
114
124
props . images . filter ( ( img ) => img . length > 0 ) . length > 0 && (
You can’t perform that action at this time.
0 commit comments