Skip to content

feat: make component name ignore list configurable#129

Draft
pastelsky wants to merge 1 commit intoaidenybai:mainfrom
pastelsky:feat/configurable-ignore-components-122
Draft

feat: make component name ignore list configurable#129
pastelsky wants to merge 1 commit intoaidenybai:mainfrom
pastelsky:feat/configurable-ignore-components-122

Conversation

@pastelsky
Copy link

@pastelsky pastelsky commented Jan 26, 2026

Closes #122. Exposes a configurable option to ignore specific component names when searching for the nearest component.


Summary by cubic

Adds a configurable ignoreComponents option to filter out specific component names when detecting the nearest component and generating context/snippets. This improves accuracy in apps with wrapper or utility components.

  • New Features

    • Added Options.ignoreComponents to React Grab. Accepts strings, regexes, or a predicate function.
    • Applied to getNearestComponentName, getComponentDisplayName, generateSnippet, copy, and element context.
    • AgentManager now accepts getPluginOptions to pass the option through plugins and runtime.
    • Introduced IgnoreComponentsOption type in the public API.
  • Bug Fixes

    • Component filtering now ignores names containing “Provider” or “Context” (previously required both).

Written for commit 396586a. Summary will update on new commits.

@vercel
Copy link

vercel bot commented Jan 26, 2026

Someone is attempting to deploy a commit to the Million Team on Vercel.

A member of the Team first needs to authorize it.

@pastelsky pastelsky force-pushed the feat/configurable-ignore-components-122 branch 2 times, most recently from 6adf231 to a680ccd Compare January 26, 2026 16:24
@pastelsky pastelsky force-pushed the feat/configurable-ignore-components-122 branch from a680ccd to 396586a Compare January 26, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Component name filter misses common Provider patterns (e.g., ThemeProvider, StyleCacheProvider)

1 participant