diff --git a/src/components/AIChat/AIChat.tsx b/src/components/AIChat/AIChat.tsx index 669708207..2360f0b4e 100644 --- a/src/components/AIChat/AIChat.tsx +++ b/src/components/AIChat/AIChat.tsx @@ -101,11 +101,20 @@ export function AIChat(props: AIChatProps) { useMutation( { mutationFn: (messages: RoadmapAIChatHistoryType[]) => { + if (!defaultChatHistoryId) { + return Promise.resolve({ + status: 200, + message: 'Chat history not found', + }); + } + return httpPost(`/v1-delete-chat-message/${defaultChatHistoryId}`, { messages, }); }, onSuccess: () => { + textareaMessageRef.current?.focus(); + queryClient.invalidateQueries( chatHistoryOptions(defaultChatHistoryId), ); diff --git a/src/components/AIChatHistory/ListChatHistory.tsx b/src/components/AIChatHistory/ListChatHistory.tsx index 706d5cea1..c60e23da6 100644 --- a/src/components/AIChatHistory/ListChatHistory.tsx +++ b/src/components/AIChatHistory/ListChatHistory.tsx @@ -229,7 +229,7 @@ export function UpgradeToProMessage(props: UpgradeToProMessageProps) { {closeButton} -
+
@@ -242,7 +242,7 @@ export function UpgradeToProMessage(props: UpgradeToProMessageProps) {

-
+
Unlimited history