Add explore feed pipeline

This commit is contained in:
thePR0M3TH3AN committed 2026-01-22 19:04:50 -05:00
1 parent bb96aabdae
commit c3aa42f39c
5 files changed
+336 -32

No files matched your search

+3 -1
View File
@@ -275,8 +275,10 @@ export function createResolvePostedAtStage({
export function createTagPreferenceFilterStage({
stageName = "tag-preference-filter",
matchInterests = true,
} = {}) {
return async function tagPreferenceFilterStage(items = [], context = {}) {
const shouldMatchInterests = matchInterests !== false;
const tagPreferences = context?.runtime?.tagPreferences;
const interests = normalizeTagSet(tagPreferences?.interests);
const disinterests = normalizeTagSet(tagPreferences?.disinterests);
@@ -340,7 +342,7 @@ export function createTagPreferenceFilterStage({
let matchedInterests = [];
if (interests.size) {
matchedInterests = [...videoTags].filter((tag) => interests.has(tag));
if (matchedInterests.length === 0) {
if (shouldMatchInterests && matchedInterests.length === 0) {
context?.addWhy?.({
stage: stageName,
type: "filter",