@@ -11,19 +11,17 @@ import { useChatStore } from '@/web/core/chat/context/useChatStore';
1111import { getQuoteDataList } from '@/web/core/chat/api' ;
1212
1313const QuoteList = React . memo ( function QuoteList ( {
14- chatItemId,
15- rawSearch = [ ] ,
16- chatTime
14+ chatItemDataId = '' ,
15+ rawSearch = [ ]
1716} : {
18- chatItemId ?: string ;
17+ chatItemDataId ?: string ;
1918 rawSearch : SearchDataResponseItemType [ ] ;
20- chatTime : Date ;
2119} ) {
2220 const theme = useTheme ( ) ;
2321 const { chatId, appId, outLinkAuthData } = useChatStore ( ) ;
2422
2523 const RawSourceBoxProps = useContextSelector ( ChatBoxContext , ( v ) => ( {
26- chatItemId ,
24+ chatItemDataId ,
2725 appId : v . appId ,
2826 chatId : v . chatId ,
2927 ...( v . outLinkAuthData || { } )
@@ -34,13 +32,12 @@ const QuoteList = React.memo(function QuoteList({
3432 ( v ) => v . showRouteToDatasetDetail
3533 ) ;
3634
37- const { data } = useRequest2 (
35+ const { data : quoteList } = useRequest2 (
3836 async ( ) =>
3937 await getQuoteDataList ( {
4038 datasetDataIdList : rawSearch . map ( ( item ) => item . id ) ,
41- chatTime,
4239 collectionIdList : [ ...new Set ( rawSearch . map ( ( item ) => item . collectionId ) ) ] ,
43- chatItemId : chatItemId || '' ,
40+ chatItemDataId ,
4441 appId,
4542 chatId,
4643 ...outLinkAuthData
@@ -53,7 +50,7 @@ const QuoteList = React.memo(function QuoteList({
5350 const formatedDataList = useMemo ( ( ) => {
5451 return rawSearch
5552 . map ( ( item ) => {
56- const currentFilterItem = data ?. quoteList . find ( ( res ) => res . _id === item . id ) ;
53+ const currentFilterItem = quoteList ? .find ( ( res ) => res . _id === item . id ) ;
5754
5855 return {
5956 ...item ,
@@ -66,7 +63,7 @@ const QuoteList = React.memo(function QuoteList({
6663 const bScore = formatScore ( b . score ) ;
6764 return ( bScore . primaryScore ?. value || 0 ) - ( aScore . primaryScore ?. value || 0 ) ;
6865 } ) ;
69- } , [ data ?. quoteList , rawSearch ] ) ;
66+ } , [ quoteList , rawSearch ] ) ;
7067
7168 return (
7269 < >
0 commit comments