fix: removed unnecessary newline replacement

- Removed unnecessary newline replacement from input message content.
This commit is contained in:
kangfenmao 2024-10-16 11:23:58 +08:00
parent 31e912aac3
commit 04ce641bf7

View File

@ -83,7 +83,7 @@ const Inputbar: FC<Props> = ({ assistant, setActiveTopic }) => {
const message: Message = { const message: Message = {
id: uuid(), id: uuid(),
role: 'user', role: 'user',
content: text.replace(/\n/g, ' \n'), content: text,
assistantId: assistant.id, assistantId: assistant.id,
topicId: assistant.topics[0].id || uuid(), topicId: assistant.topics[0].id || uuid(),
createdAt: dayjs().format('YYYY-MM-DD HH:mm:ss'), createdAt: dayjs().format('YYYY-MM-DD HH:mm:ss'),