diff --git a/web/app/_components/InputToolbar/index.tsx b/web/app/_components/InputToolbar/index.tsx index a47aab477..54e72b34a 100644 --- a/web/app/_components/InputToolbar/index.tsx +++ b/web/app/_components/InputToolbar/index.tsx @@ -34,23 +34,16 @@ const InputToolbar: React.FC = () => { return ( +
+ {currentConvoState?.error && ( +
+ + {currentConvoState?.error?.toString()} + +
+ )} +
- {/* TODO: take loading out of input toolbar and into response */} -
- {currentConvoState?.waitingForResponse === true && ( -
- -
- )} - {!currentConvoState?.waitingForResponse && - currentConvoState?.error && ( -
- - {currentConvoState?.error?.toString()} - -
- )} -
{/* */} { + return getMessageCode(text).map((item, i) => ( +
+

+ {item.text} +

+ {item.code.trim().length > 0 && } +
+ )); +}; + const SimpleTextMessage: React.FC = ({ senderName, createdAt, @@ -43,15 +55,10 @@ const SimpleTextMessage: React.FC = ({ {displayDate(createdAt)}
- {text.includes("```") ? ( - getMessageCode(text).map((item, i) => ( -
-

- {item.text} -

- {item.code.trim().length > 0 && } -
- )) + {text === "" ? ( + + ) : text.includes("```") ? ( + renderMessageCode(text) ) : ( {text} )}