File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import type {
1919 ChatMessage ,
2020 ChatMessageAttachment ,
2121 ChatMessageContext ,
22+ ContentBlock ,
2223 FileAttachmentForApi ,
2324 MothershipResource ,
2425 QueuedMessage ,
@@ -80,6 +81,8 @@ const LAYOUT_STYLES = {
8081 } ,
8182} as const
8283
84+ const EMPTY_BLOCKS : ContentBlock [ ] = [ ]
85+
8386interface UserMessageRowProps {
8487 content : string
8588 contexts ?: ChatMessageContext [ ]
@@ -133,7 +136,7 @@ const AssistantMessageRow = memo(function AssistantMessageRow({
133136 onOptionSelect,
134137 onWorkspaceResourceSelect,
135138} : AssistantMessageRowProps ) {
136- const blocks = message . contentBlocks ?? [ ]
139+ const blocks = message . contentBlocks ?? EMPTY_BLOCKS
137140 const hasAnyBlocks = blocks . length > 0
138141 const trimmedContent = message . content ?. trim ( ) ?? ''
139142
You can’t perform that action at this time.
0 commit comments