feat: INCLUDE_SOURCES config + TikTok/Instagram opt-in in NUX

* feat: INCLUDE_SOURCES config + TikTok/Instagram opt-in in NUX

- INCLUDE_SOURCES=tiktok,instagram in .env forces sources on for all
  query types, bypassing the tier system
- NUX shows opt-in modal after ScrapeCreators key is saved: "Also
  search TikTok and Instagram?" with honest call-usage warning
- Tier system preserved as default — override only when INCLUDE_SOURCES set

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: neutral call-usage copy — works for free and paid tiers

---------

Co-authored-by: Matt Van Horn <mvanhorn@MacBook-Pro.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt Van Horn
2026-03-30 06:22:37 -07:00
committed by GitHub
parent bb79d54b2b
commit 61904b31e3
4 changed files with 91 additions and 1 deletions
+12
View File
@@ -1735,6 +1735,18 @@ def main():
search_run_tiktok = has_tiktok and qt.is_source_enabled("tiktok", query_type)
search_run_instagram = has_instagram and qt.is_source_enabled("instagram", query_type)
search_run_xiaohongshu = has_xiaohongshu
# INCLUDE_SOURCES override: force specific sources on regardless of tier
_include_sources = {s.strip().lower() for s in config.get('INCLUDE_SOURCES', '').split(',') if s.strip()}
if _include_sources:
if 'tiktok' in _include_sources and has_tiktok:
if not search_run_tiktok:
sys.stderr.write("[Config] INCLUDE_SOURCES override: forcing tiktok\n")
search_run_tiktok = True
if 'instagram' in _include_sources and has_instagram:
if not search_run_instagram:
sys.stderr.write("[Config] INCLUDE_SOURCES override: forcing instagram\n")
search_run_instagram = True
if args.search:
search_sources = parse_search_flag(args.search)
has_reddit = "reddit" in search_sources
+1
View File
@@ -374,6 +374,7 @@ def get_config() -> Dict[str, Any]:
('TRUTHSOCIAL_TOKEN', None),
('FROM_BROWSER', None),
('SETUP_COMPLETE', None),
('INCLUDE_SOURCES', None),
]
for key, default in keys: