From 2a06d9a71ff3b14e5c0fdd0b11c418b2da05708b Mon Sep 17 00:00:00 2001 From: xyyxr <32702206+luoyxy@users.noreply.github.com> Date: Tue, 7 Jul 2026 23:11:58 +0800 Subject: [PATCH] feat(config): codegraph.json `include` to force gitignored first-party source into the index (#1063) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds an `include` list to the root `codegraph.json` that forces gitignored first-party source (second-VCS / SVN / Perforce dual-tracked repos) into the index — discovered directly off disk on the full index, incremental sync, and file-watching, on both git and non-git projects. Gitignore-style patterns, root-relative; explicit `exclude` still wins and built-in skips (node_modules, dist, .git) are never re-included. Complements `exclude` and `includeIgnored`. Closes #1163. Thanks @luoyxy for the contribution. --- CHANGELOG.md | 1 + README.md | 15 + __tests__/include-config.test.ts | 262 ++++++++++++++++++ .../docs/getting-started/configuration.md | 26 +- src/extraction/index.ts | 203 +++++++++++++- src/project-config.ts | 67 ++++- 6 files changed, 568 insertions(+), 6 deletions(-) create mode 100644 __tests__/include-config.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ecab07..537d951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Anonymous usage telemetry now counts how often the context hook injected context, offered a hint, or stayed silent — fixed counter names only; the prompt's content is never stored or sent. This makes the hook's accuracy measurable instead of guessed. The counters record what actually happened, not what was attempted: a lookup that errors or comes back empty counts as a distinct silent outcome, never as delivered context (#1143, thanks @inth3shadows). - Metal shader files (`.metal`) are now indexed. Metal Shading Language is close enough to C++ that vertex/fragment/kernel functions, structs, type aliases, and the calls between them all land in the graph — so shader pipelines in Apple-platform projects show up in impact analysis and flow traces instead of being silently skipped. Metal's `[[buffer(0)]]`-style attribute annotations are handled so they can't corrupt what gets extracted. Thanks @FluxKo for the report. (#1121) - CodeGraph now indexes legacy **iBatis 2** SQL maps (``), not just MyBatis 3 `` files. `