File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ import type { DocumentManagementService } from "../store/DocumentManagementServi
44import type { ProgressResponse } from "../types" ; // Keep for options interface, though onProgress is removed from internal logic
55import { logger } from "../utils/logger" ;
66
7+ // Default values for scraping configuration
8+ const DEFAULT_MAX_PAGES = 1000 ;
9+ const DEFAULT_MAX_DEPTH = 3 ;
10+
711export interface ScrapeToolOptions {
812 library : string ;
913 version ?: string | null ; // Make version optional
@@ -115,8 +119,8 @@ export class ScrapeTool {
115119 version : internalVersion ,
116120 scope : scraperOptions ?. scope ?? "subpages" ,
117121 followRedirects : scraperOptions ?. followRedirects ?? true ,
118- maxPages : scraperOptions ?. maxPages ?? 100 ,
119- maxDepth : scraperOptions ?. maxDepth ?? 3 ,
122+ maxPages : scraperOptions ?. maxPages ?? DEFAULT_MAX_PAGES ,
123+ maxDepth : scraperOptions ?. maxDepth ?? DEFAULT_MAX_DEPTH ,
120124 // maxConcurrency is handled by the manager itself now
121125 ignoreErrors : scraperOptions ?. ignoreErrors ?? true ,
122126 } ) ;
You can’t perform that action at this time.
0 commit comments