1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-09-25 00:21:28 +02:00
This commit is contained in:
Kamran Ahmed
2025-06-11 18:20:48 +01:00
parent aeb184cd05
commit c1415e55b7
3 changed files with 4 additions and 4 deletions

View File

@@ -18,7 +18,6 @@ import { useMutation, useQuery } from '@tanstack/react-query';
import { queryClient } from '../../stores/query-client';
import { billingDetailsOptions } from '../../queries/billing';
import { useToast } from '../../hooks/use-toast';
import { readStream } from '../../lib/ai';
import { markdownToHtml } from '../../lib/markdown';
import { ChatHistory } from './ChatHistory';
import { PersonalizedResponseForm } from './PersonalizedResponseForm';
@@ -444,7 +443,7 @@ export function AIChat(props: AIChatProps) {
<div className="pointer-events-auto flex items-center justify-between gap-2">
<div className="flex items-center gap-2">
<LockIcon className="size-4" strokeWidth={2.5} />
<p>Upgrade to Pro to keep your conversations.</p>
<p>Your chat history is not saved.</p>
</div>
<button
type="button"

View File

@@ -68,6 +68,7 @@ export function AIChatHistory(props: AIChatHistoryProps) {
setChatHistoryId(undefined);
window.history.replaceState(null, '', '/ai/chat');
setKeyTrigger((key) => key + 1);
},
[chatHistoryId],
);
@@ -76,7 +77,6 @@ export function AIChatHistory(props: AIChatHistoryProps) {
const hasError = chatHistoryError || billingDetailsError;
// derived UI states to make JSX clearer
const showLoader = isChatHistoryLoading && !hasError;
const showError = !isChatHistoryLoading && Boolean(hasError);

View File

@@ -37,6 +37,7 @@ export function ListChatHistory(props: ListChatHistoryProps) {
useLayoutEffect(() => {
const deviceType = getTailwindScreenDimension();
const isMediumSize = ['sm', 'md'].includes(deviceType);
setIsOpen(!isMediumSize);
setIsMobile(isMediumSize);
}, []);
@@ -148,7 +149,7 @@ export function ListChatHistory(props: ListChatHistoryProps) {
</div>
<button
className="flex w-full items-center justify-center gap-2 rounded-lg bg-black p-2 text-sm text-white"
className="flex w-full items-center hover:opacity-80 justify-center gap-2 rounded-lg bg-black p-2 text-sm text-white"
onClick={() => {
if (isMobile) {
setIsOpen(false);