Repository navigation
feat: add the Meta AI provider (0.8.0) (ENG-46) - #16
Merged
Merged
Conversation
Add META_AI, for the page that POST /v1/monitor/meta-ai stores with include.html. The rules use roles, data attributes and structure, not class names, because the page classes are Tailwind utilities. - Always hidden: the log-in and sign-up buttons, toasts, open dialogs. - removeHeader: the title bar. removeFooter: the prompt box. removeSidebar: the left rail. removeSources: the citation chips and the Sources button; the answer text and the entity pills stay. - The page keeps its own <base href="https://www.meta.ai/">. - The detector finds the page by its base URL, logo and composer. The Perplexity "prose" pattern skips pages from www.meta.ai. Tests: 43 new tests on three real captures (news with sources, plain, table) in test/fixtures/meta-ai/, because samples/ is not committed. Claude-Session: https://claude.ai/code/session_01Vi9vyc4nPaECMgzccWiEMb
Revert the www.meta.ai exclusion in the Perplexity pattern, which CodeQL reported as incomplete URL substring sanitization. Split the Meta AI logo and composer checks into two patterns instead: a Meta AI page without its base URL now scores 2 for META_AI and 1 for PERPLEXITY. Claude-Session: https://claude.ai/code/session_01Vi9vyc4nPaECMgzccWiEMb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
META_AIprovider for the page thatPOST /v1/monitor/meta-aistores withinclude.html. Until now the dashboard used the Grok provider for Meta AI, and the Grok rules hide nothing on a Meta AI page.Cleanup options
[data-slot="flexbox"]:has(> * > [data-testid="login-button"])[data-sonner-toaster],[role="dialog"],[data-radix-popper-content-wrapper]removeHeadermain [data-scroll-container] > :not(:has([role="feed"]))removeFootermain div:has(composer-render-mark):not(:has([role="feed"]))removeSidebarnav[data-slot="sidebar"]removeSources[data-testid="citation-pill"], [data-testid="sources-pill"]removeLinks,invertColorsremoveSourceskeeps the answer text. The entity pills (for example "NASA") are part of the answer and stay.<base href="https://www.meta.ai/">, and the provider keeps it.meta-ai-orbit-logoimage, the logged-out composer). A Meta AI page also matches the Perplexity "prose" pattern, so it scores 3 to 1, or 2 to 1 without its base URL. Before this PR, the three captures were detected asPERPLEXITY.Checks
pnpm type-check,pnpm lint,pnpm test: 75/75 pass (43 new).test/fixtures/meta-ai/(news with 6 sources, plain, table), becausesamples/is gitignored. They add about 260 KB.Risks
role="feed",data-scroll-container,composer-render-mark). A redesign can break them.Release
After merge, tag
v0.8.0to publish. Then cloro-dev/dashboard#119 changes the Meta AIhtmlProviderfromGROKtoMETA_AI.https://claude.ai/code/session_01Vi9vyc4nPaECMgzccWiEMb