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 = {
messages: ChatMessage[];
draft: string;
onDraftChange: (value: string) => void;
onSend: () => void;
onSend: (value: string) => void;
onTip?: () => void;
onRevealSolution?: () => void;
isSending?: boolean;
......
......@@ -835,9 +835,9 @@ export default function ChatPage() {
setRetrievalLoading(false);
};
const handleSend = async () => {
const handleSend = async (value: string) => {
await sendMessage({
text: draft,
text: value,
clearDraft: true,
});
};
......
......@@ -586,6 +586,7 @@ body {
}
.composer-rich-input {
position: relative;
min-height: 92px;
line-height: 1.6;
white-space: pre-wrap;
......@@ -594,9 +595,20 @@ body {
cursor: text;
}
.composer-rich-input[data-empty="true"]::before,
.composer-rich-input:empty::before {
content: attr(data-placeholder);
color: #8b857b;
pointer-events: none;
}
.composer-text-part {
display: inline;
outline: none;
}
.composer-text-part:empty::before {
content: "\200b";
}
.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