Compare commits

..

1 Commits

Author SHA1 Message Date
shokollm
dfa806ab53 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.
2026-04-10 04:00:51 +00:00

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 });