feat(code): port posthog detection logic to new pkg#1562
feat(code): port posthog detection logic to new pkg#1562
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
38db67a to
2ea3446
Compare
bbf4b18 to
f213e16
Compare
|
i'm not allowed to review this cuz github still considers me the author lol but i see there are a lot of changes, just checking this could still be used in the vscode extension to replace the existing tree sitter service? |
|
also looping in @fercgomes , any concerns w/ updating vscode ext to grab the pkg from here? |
Just so I understand the context: is this the actual logic from the extension, or is it a parallel implementation with the same goals? |
|
@fercgomes the goal is for posthog code to have the same sort of event/flag/etc detection that the vscode extension has. we want to use it in a few places -- injecting into agent context, showing in diff reviews, etc this base PR is, i think, a pretty direct copy of the logic from the extension (though it is 100% vibe-ported) @k11kirky has made some changes upstack but i think it's still the same logic, peter can you confirm? |

Problem
This adds a new
@posthog/enricherpackage that provides PostHog SDK usage detection and enrichment capabilities for source code analysis. The package can detect PostHog method calls, feature flag usage, variant branches, and initialization calls across multiple programming languages (JavaScript, TypeScript, Python, Go, Ruby) using tree-sitter parsers.Changes
packages/enricher/with TypeScript source code for detecting PostHog SDK usage patterns