Skip to content

Commit f0c8478

Browse files
skeptrunedevcdxker
authored andcommitted
bugfix: only one highly relevant should just ret one product
1 parent db9a449 commit f0c8478

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

clients/search-component/src/utils/hooks/chat-context.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -885,17 +885,9 @@ function ChatProvider({ children }: { children: React.ReactNode }) {
885885
clearTimeout(relevanceToolCallTimeout);
886886
let groupIdsToUse = highlyRelevantGroupIds;
887887

888-
if (highlyRelevantGroupIds.length > 1) {
888+
if (highlyRelevantGroupIds.length > 0) {
889889
groupIdsToUse = [...highlyRelevantGroupIds];
890-
} else if (highlyRelevantGroupIds.length === 1) {
891-
groupIdsToUse = [
892-
...highlyRelevantGroupIds,
893-
...mediumRelevantGroupIds,
894-
];
895-
} else if (
896-
highlyRelevantGroupIds.length === 0 &&
897-
mediumRelevantGroupIds.length > 0
898-
) {
890+
} else if (mediumRelevantGroupIds.length > 0) {
899891
groupIdsToUse = mediumRelevantGroupIds;
900892
} else if (lowlyRelevantGroupIds.length > 0) {
901893
groupIdsToUse = [...lowlyRelevantGroupIds];

0 commit comments

Comments
 (0)