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
feat: add symlink support for AGENTS.md file loading (#6326)
* feat: add symlink support for AGENTS.md file loading
- Add safeReadFileFollowingSymlinks function to handle symlink resolution
- Update loadAgentRulesFile to use the new symlink-aware function
- Add comprehensive tests for both symlink and regular file scenarios
- Ensures AGENTS.md can be a symlink pointing to actual rules file
* refactor: use existing symlink resolution pattern for AGENTS.md
- Extracted resolveSymlinkPath function to handle symlink resolution
- Removed duplicate safeReadFileFollowingSymlinks function
- Updated loadAgentRulesFile to use resolveSymlinkPath + safeReadFile
- Updated tests to match new implementation
- Maintains same functionality while reusing existing patterns
* fix: simplify symlink resolution for AGENTS.md to fix Windows compatibility
- Remove duplicate resolveSymlinkPath function as suggested by @mrubens
- Use simpler inline symlink resolution in loadAgentRulesFile
- Update tests to match simplified implementation
- This should fix the failing Windows unit tests while maintaining functionality
* refactor: use existing resolveSymLink function for AGENTS.md symlink support
- Remove duplicate inline symlink resolution logic
- Reuse existing resolveSymLink function with MAX_DEPTH protection
- Adapt loadAgentRulesFile to work with resolveSymLink's fileInfo interface
- Fix test to properly mock fs.stat for resolved symlink targets
- All tests pass (36/36)
---------
Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Daniel Riccio <[email protected]>
0 commit comments