Commit 9f6573c0 authored by Kantz's avatar Kantz
Browse files

error with parial loss of message fixed

parent 3f8118b0
...@@ -8,7 +8,7 @@ type ChatWindowProps = { ...@@ -8,7 +8,7 @@ type ChatWindowProps = {
messages: ChatMessage[]; messages: ChatMessage[];
draft: string; draft: string;
onDraftChange: (value: string) => void; onDraftChange: (value: string) => void;
onSend: () => void; onSend: (value: string) => void;
onTip?: () => void; onTip?: () => void;
onRevealSolution?: () => void; onRevealSolution?: () => void;
isSending?: boolean; isSending?: boolean;
......
...@@ -835,9 +835,9 @@ export default function ChatPage() { ...@@ -835,9 +835,9 @@ export default function ChatPage() {
setRetrievalLoading(false); setRetrievalLoading(false);
}; };
const handleSend = async () => { const handleSend = async (value: string) => {
await sendMessage({ await sendMessage({
text: draft, text: value,
clearDraft: true, clearDraft: true,
}); });
}; };
......
...@@ -586,6 +586,7 @@ body { ...@@ -586,6 +586,7 @@ body {
} }
.composer-rich-input { .composer-rich-input {
position: relative;
min-height: 92px; min-height: 92px;
line-height: 1.6; line-height: 1.6;
white-space: pre-wrap; white-space: pre-wrap;
...@@ -594,9 +595,20 @@ body { ...@@ -594,9 +595,20 @@ body {
cursor: text; cursor: text;
} }
.composer-rich-input[data-empty="true"]::before,
.composer-rich-input:empty::before { .composer-rich-input:empty::before {
content: attr(data-placeholder); content: attr(data-placeholder);
color: #8b857b; color: #8b857b;
pointer-events: none;
}
.composer-text-part {
display: inline;
outline: none;
}
.composer-text-part:empty::before {
content: "\200b";
} }
.composer-rich-input:focus { .composer-rich-input:focus {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment