Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/scanner/anatomy-scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]);
Expand Down
9 changes: 8 additions & 1 deletion src/tracker/token-estimator.ts
Original file line number Diff line number Diff line change
@@ -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"]);
Expand Down