You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`--diff` CLI flag** — generates context only for files changed in the current git working tree (`git diff HEAD --name-only`). Useful in CI and pre-review workflows where you only want signatures for files you've touched.
13
+
-**`--diff --staged` variant** — restricts context to files in the git staging area only (`git diff --cached --name-only`). Ideal as a pre-commit check.
14
+
-**Smart fallback** — both `--diff` modes automatically fall back to a full `runGenerate` when: outside a git repo, no changed files, or all changed files are outside tracked `srcDirs`. No silent failures.
15
+
-**`--diff --report`** — when both flags are used together, prints a side-by-side comparison of diff-mode vs full-mode token counts and savings.
16
+
-**`watchDebounce` config key** — new key in `gen-context.config.json` (default: `300`) controls the debounce delay (ms) between file-system events and regeneration in watch mode. Configurable per project.
17
+
-**`test/integration/diff.test.js`** — 6 integration tests covering all diff-mode scenarios:
18
+
- Diff-only output excludes unchanged files
19
+
-`--staged` excludes unstaged modifications
20
+
- Empty diff fallback to full generate
21
+
- Non-git-repo fallback
22
+
- Changed files outside srcDirs fallback
23
+
- Multiple changed files all appear in output
24
+
25
+
### Changed
26
+
- Watch mode debounce reduced from **500 ms → 300 ms** (default). Now reads `config.watchDebounce || 300` — fully configurable.
0 commit comments