Skip to content

fix: correct path boundary checking in StateHelper - #16

Merged
tangcent merged 1 commit into
mainfrom
doc/readme-skills-install
Apr 10, 2026
Merged

tangcent merged 1 commit into
mainfrom
doc/readme-skills-install

Conversation

@tangcent

Copy link
Copy Markdown
Owner

Changes

  • Replace simple startsWith with proper path boundary check
  • Prevent false matches when path names share prefixes (e.g., /foo/bar matching /foo/barbaz)
  • Add test cases to verify correct behavior for paths with common prefixes
  • Apply fix to both JetBrains and VSCode implementations

This fix ensures that path checking correctly identifies whether a file is inside a root directory by checking for proper path boundaries, not just prefix matching.

- Replace simple startsWith with proper path boundary check
- Prevent false matches when path names share prefixes (e.g., /foo/bar matching /foo/barbaz)
- Add test cases to verify correct behavior for paths with common prefixes
- Apply fix to both JetBrains and VSCode implementations
@tangcent
tangcent merged commit 4a8358b into main Apr 10, 2026
1 check passed
@tangcent
tangcent deleted the doc/readme-skills-install branch June 3, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant