File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
ui/packages/platform/src/pages/Bot/Messages Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,14 @@ type BaseMessageProps = {
2222 formattedTime ?: string ;
2323 aiModel ?: string
2424 stateMessage ?: StateMessage | null
25+ isCurrentStreamMessage ?: boolean
2526}
2627
2728type AiMessageProps = BaseMessageProps & {
2829 isAi : true ;
2930 content : string ;
3031 aiModel : string
32+ isCurrentStreamMessage ?: boolean
3133}
3234
3335type HumanMessageProps = BaseMessageProps & {
@@ -256,7 +258,8 @@ export const Message = React.memo((props: MessageProps) => {
256258 created_at,
257259 isLoading,
258260 aiModel,
259- stateMessage
261+ stateMessage,
262+ isCurrentStreamMessage
260263 } = props ;
261264
262265 const [ isDebugVisible , setDebugVisible ] = useState ( false ) ;
@@ -280,7 +283,7 @@ export const Message = React.memo((props: MessageProps) => {
280283 if ( ! inline ) {
281284 return (
282285 < >
283- { matchMermaid && < MermaidDiagram chart = { String ( children ) . replace ( / \n $ / , '' ) } /> }
286+ { matchMermaid && ! isCurrentStreamMessage && < MermaidDiagram chart = { String ( children ) . replace ( / \n $ / , '' ) } /> }
284287 < CodeBlock value = { String ( children ) . replace ( / \n $ / , '' ) } language = { match ?. [ 1 ] } />
285288 </ >
286289 )
Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ export const Messages = React.memo(() => {
281281 isAi
282282 content = { currentStreamMessage . content }
283283 aiModel = { currentStreamMessage . ai_model }
284+ isCurrentStreamMessage
284285 />
285286 }
286287 { isWaitingForAnswer &&
You can’t perform that action at this time.
0 commit comments