diff --git a/src/scanner/anatomy-scanner.ts b/src/scanner/anatomy-scanner.ts index c058ce9..1de2234 100644 --- a/src/scanner/anatomy-scanner.ts +++ b/src/scanner/anatomy-scanner.ts @@ -38,10 +38,17 @@ const BINARY_EXTENSIONS = new Set([ ".lock", ]); +// Keep in sync with CODE_EXTS in src/tracker/token-estimator.ts const CODE_EXTENSIONS = new Set([ ".ts", ".js", ".tsx", ".jsx", ".py", ".rs", ".go", ".java", ".c", ".cpp", ".h", ".css", ".scss", ".sql", ".sh", ".yaml", - ".yml", ".json", ".toml", ".xml", + ".yml", ".json", ".toml", ".xml", ".dart", + ".kt", ".kts", ".swift", ".m", ".mm", + ".hpp", ".hh", ".cc", ".cxx", + ".cs", ".rb", ".php", ".lua", + ".vue", ".svelte", ".html", ".htm", + ".proto", ".graphql", ".gql", ".tf", + ".bash", ".zsh", ".fish", ]); const PROSE_EXTENSIONS = new Set([".md", ".txt", ".rst", ".adoc"]); diff --git a/src/tracker/token-estimator.ts b/src/tracker/token-estimator.ts index 4e93b0d..6009a91 100644 --- a/src/tracker/token-estimator.ts +++ b/src/tracker/token-estimator.ts @@ -1,9 +1,16 @@ import * as path from "node:path"; +// Keep in sync with CODE_EXTENSIONS in src/scanner/anatomy-scanner.ts const CODE_EXTS = new Set([ ".ts", ".js", ".tsx", ".jsx", ".py", ".rs", ".go", ".java", ".c", ".cpp", ".h", ".css", ".scss", ".sql", ".sh", ".yaml", - ".yml", ".json", ".toml", ".xml", + ".yml", ".json", ".toml", ".xml", ".dart", + ".kt", ".kts", ".swift", ".m", ".mm", + ".hpp", ".hh", ".cc", ".cxx", + ".cs", ".rb", ".php", ".lua", + ".vue", ".svelte", ".html", ".htm", + ".proto", ".graphql", ".gql", ".tf", + ".bash", ".zsh", ".fish", ]); const PROSE_EXTS = new Set([".md", ".txt", ".rst", ".adoc"]);