fix: add user's message to frontend chat store when sending

Previously, only the assistant's response was added to the frontend store.
Now both user and assistant messages are stored, so the conversation
displays correctly in the chat interface.
This commit is contained in:
shokollm
2026-04-10 04:00:51 +00:00
parent 82645dfb3b
commit dfa806ab53

View File

@@ -44,6 +44,9 @@
isSending = true; isSending = true;
// Add user's message immediately
addMessage({ role: 'user', content: message });
try { try {
const response = await api.bots.chat(botId, message); const response = await api.bots.chat(botId, message);
addMessage({ role: 'assistant', content: response.response }); addMessage({ role: 'assistant', content: response.response });