Feat: Render chat page #3221 (#9298)

### What problem does this PR solve?

Feat: Render chat page #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-08-07 11:07:15 +08:00
committed by GitHub
parent 7c719f8365
commit f0c34d4454
12 changed files with 613 additions and 53 deletions

View File

@ -0,0 +1,20 @@
import { useClickConversationCard } from '@/hooks/use-chat-request';
import { useCallback, useState } from 'react';
export function useHandleClickConversationCard() {
const [controller, setController] = useState(new AbortController());
const { handleClickConversation } = useClickConversationCard();
const handleConversationCardClick = useCallback(
(conversationId: string, isNew: boolean) => {
handleClickConversation(conversationId, isNew ? 'true' : '');
setController((pre) => {
pre.abort();
return new AbortController();
});
},
[handleClickConversation],
);
return { controller, handleConversationCardClick };
}