mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-16 12:27:06 +00:00
9b583a0dd5
The Read|Glob PreToolUse hook (the "run graphify first" nudge, shared by the Claude Code and CodeBuddy installers via _READ_SETTINGS_HOOK) decided whether to nudge by substring-scanning the joined file_path/pattern/path for known extensions. That had two opposite failures: '.js' is a substring of '.json' so package.json / tsconfig.json spuriously fired, and .astro/.vue/.svelte weren't in the set so Astro/Vue/Svelte projects never nudged on their primary source type. The hook now compares each value's real trailing extension (segment after the last '/', then after the last '.') against the set, and adds .astro/.vue/.svelte. package.json -> tail .json (silent); **/*.astro -> tail .astro (fires); an extension on a directory component (my.ts/file) correctly stays silent. The graphify-out/ suppression and fail-open behavior are unchanged. Ported from PR #1464 by @marketechniks onto current v8. Added three regression tests on top of the PR's (multi-dot a.test.tsx / foo.min.js, a Windows backslash path, and the directory-extension trap) to pin the trickiest parts of the new segment-split logic. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>