From 0f96d0797da83f45e006f9b9b81f7f2d01ee5cee Mon Sep 17 00:00:00 2001 From: crazywoola <427733928@qq.com> Date: Wed, 23 Apr 2025 17:41:41 +0800 Subject: [PATCH] feat: add missing switches --- web/app/layout.tsx | 3 +++ web/config/index.ts | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/web/app/layout.tsx b/web/app/layout.tsx index 6b5618f217..e544f272a6 100644 --- a/web/app/layout.tsx +++ b/web/app/layout.tsx @@ -54,6 +54,9 @@ const LocaleLayout = async ({ data-public-indexing-max-segmentation-tokens-length={process.env.NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH} data-public-loop-node-max-count={process.env.NEXT_PUBLIC_LOOP_NODE_MAX_COUNT} data-public-max-iterations-num={process.env.NEXT_PUBLIC_MAX_ITERATIONS_NUM} + data-public-enable-website-jinareader={process.env.NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER} + data-public-enable-website-firecrawler={process.env.NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL} + data-public-enable-website-watercrawler={process.env.NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL} > diff --git a/web/config/index.ts b/web/config/index.ts index 3466686293..af4da76835 100644 --- a/web/config/index.ts +++ b/web/config/index.ts @@ -306,12 +306,12 @@ export const MAX_ITERATIONS_NUM = maxIterationsNum export const ENABLE_WEBSITE_JINAREADER = process.env.NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER !== undefined ? process.env.NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER === 'true' - : true + : globalThis.document?.body?.getAttribute('data-public-enable-website-jinareader') === 'true' || true export const ENABLE_WEBSITE_FIRECRAWL = process.env.NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL !== undefined ? process.env.NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL === 'true' - : true + : globalThis.document?.body?.getAttribute('data-public-enable-website-firecrawl') === 'true' || true export const ENABLE_WEBSITE_WATERCRAWL = process.env.NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL !== undefined ? process.env.NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL === 'true' - : true + : globalThis.document?.body?.getAttribute('data-public-enable-website-watercrawl') === 'true' || true