We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eeea49a commit 01c1b7aCopy full SHA for 01c1b7a
1 file changed
chat/src/components/chat-provider.tsx
@@ -280,6 +280,7 @@ export function ChatProvider({ children }: PropsWithChildren) {
280
});
281
282
if (!response.ok) {
283
+ setMessages((prev) => prev.filter((m) => !isDraftMessage(m)));
284
const errorData = await response.json() as APIErrorModel;
285
console.error("Failed to send message:", errorData);
286
const detail = errorData.detail;
@@ -296,6 +297,7 @@ export function ChatProvider({ children }: PropsWithChildren) {
296
297
}
298
299
} catch (error) {
300
301
console.error("Error sending message:", error);
302
const message = getErrorMessage(error)
303
0 commit comments