mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-20 02:16:39 +00:00
preserves whitespaces and newlines in message
This commit is contained in:
1 parent
5f70bf286a
commit
4bc1a87fcf
2 files changed
+2
-2
No files matched your search
@@ -48,7 +48,7 @@ export default function Conversation() {
|
|||||||
<div
|
<div
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
contentEditable
|
contentEditable
|
||||||
className={`border-000000 overflow-x-hidden; max-h-24 min-h-[2.6rem] w-full overflow-y-auto rounded-xl border bg-white p-2 pr-9 opacity-100 focus:border-2 focus:outline-none`}
|
className={`border-000000 overflow-x-hidden; max-h-24 min-h-[2.6rem] w-full overflow-y-auto whitespace-pre-wrap rounded-xl border bg-white p-2 pr-9 opacity-100 focus:border-2 focus:outline-none`}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === 'Enter' && !e.shiftKey) {
|
if (e.key === 'Enter' && !e.shiftKey) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const ConversationBubble = forwardRef<
|
|||||||
{type === 'ERROR' && (
|
{type === 'ERROR' && (
|
||||||
<img src={Alert} alt="alert" className="mr-2 inline" />
|
<img src={Alert} alt="alert" className="mr-2 inline" />
|
||||||
)}
|
)}
|
||||||
<span>{message}</span>
|
<p className="whitespace-pre-wrap break-all">{message}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user