* fix debug quote list

* delete next text node match

* fix extract default boolean value

* export latest 100 chat items

* fix quote item ui

* doc

* fix doc
This commit is contained in:
heheer
2025-04-22 20:10:35 +08:00
committed by GitHub
parent 27614e9e8b
commit 5c93545016
9 changed files with 28 additions and 26 deletions

View File

@@ -44,27 +44,30 @@ const QuoteList = React.memo(function QuoteList({
}),
{
refreshDeps: [rawSearch, RawSourceBoxProps.chatId],
manual: false
manual: !chatItemDataId
}
);
const formatedDataList = useMemo(() => {
return rawSearch
.map((item) => {
const currentFilterItem = quoteList?.find((res) => res._id === item.id);
const processedData = rawSearch.map((item) => {
if (chatItemDataId && quoteList) {
const currentFilterItem = quoteList.find((res) => res._id === item.id);
return {
...item,
q: currentFilterItem?.q || '',
a: currentFilterItem?.a || ''
};
})
.sort((a, b) => {
const aScore = formatScore(a.score);
const bScore = formatScore(b.score);
return (bScore.primaryScore?.value || 0) - (aScore.primaryScore?.value || 0);
});
}, [quoteList, rawSearch]);
}
return item;
});
return processedData.sort((a, b) => {
const aScore = formatScore(a.score);
const bScore = formatScore(b.score);
return (bScore.primaryScore?.value || 0) - (aScore.primaryScore?.value || 0);
});
}, [rawSearch, quoteList, chatItemDataId]);
return (
<>

View File

@@ -64,13 +64,15 @@ const QuoteItem = ({
fontSize={'10px'}
h={'full'}
alignItems={'center'}
mr={1}
flexShrink={0}
>
{index + 1}
</Flex>
<Flex px={1.5}>
<MyIcon name={icon as any} mr={1} flexShrink={0} w={'12px'} />
<Box
className="textEllipsis3"
className={'textEllipsis'}
wordBreak={'break-all'}
flex={'1 0 0'}
fontSize={'mini'}
@@ -81,7 +83,7 @@ const QuoteItem = ({
</Flex>
</Box>
{score && !isDeleted && (
<Box className="hover-data" visibility={'hidden'}>
<Box className="hover-data" visibility={'hidden'} flexShrink={0}>
<ScoreTag {...score} />
</Box>
)}

View File

@@ -67,7 +67,6 @@ async function handler(req: ApiRequestProps<ExportChatLogsBody, {}>, res: NextAp
}
}
]);
console.log(teamMemberWithContact);
const where = {
teamId: new Types.ObjectId(teamId),
@@ -161,7 +160,7 @@ async function handler(req: ApiRequestProps<ExportChatLogsBody, {}>, res: NextAp
},
chatDetails: {
$map: {
input: '$chatitems',
input: { $slice: ['$chatitems', -1000] },
as: 'item',
in: {
id: '$$item._id',