MCPcopy Create free account
hub / github.com/benjitaylor/agentation / ReactDetectionConfig

Interface ReactDetectionConfig

package/src/utils/react-detection.ts:150–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148export type ReactDetectionMode = "all" | "filtered" | "smart";
149
150export interface ReactDetectionConfig {
151 /**
152 * How many component names to collect
153 * @default 3
154 */
155 maxComponents?: number;
156
157 /**
158 * Maximum fiber depth to traverse
159 * @default 25
160 */
161 maxDepth?: number;
162
163 /**
164 * Detection mode:
165 * - 'smart': Only show components that correlate with DOM classes (strictest, most relevant)
166 * - 'filtered': Skip known framework internals (default)
167 * - 'all': Show all components (no filtering)
168 * @default 'filtered'
169 */
170 mode?: ReactDetectionMode;
171
172 /**
173 * Additional exact names to skip (merged with defaults in 'filtered' mode)
174 */
175 skipExact?: Set<string> | string[];
176
177 /**
178 * Additional patterns to skip (merged with defaults in 'filtered' mode)
179 */
180 skipPatterns?: RegExp[];
181
182 /**
183 * Patterns for user components (used as fallback in 'smart' mode)
184 */
185 userPatterns?: RegExp[];
186
187 /**
188 * Custom filter function for full control
189 * Return true to INCLUDE the component, false to skip
190 */
191 filter?: (name: string, depth: number) => boolean;
192}
193
194/**
195 * Resolved configuration with all defaults applied

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…