Skip to content

fix: preserve leading dot in ls tool path resolution#10515

Open
zerone0x wants to merge 1 commit intocontinuedev:mainfrom
zerone0x:fix/ls-tool-hidden-dirs
Open

fix: preserve leading dot in ls tool path resolution#10515
zerone0x wants to merge 1 commit intocontinuedev:mainfrom
zerone0x:fix/ls-tool-hidden-dirs

Conversation

@zerone0x
Copy link

@zerone0x zerone0x commented Feb 14, 2026

Description

Fixes the ls tool failing when called with hidden directory paths like .continue/rules.

The resolveLsToolDirPath function had a condition that matched paths starting with . (but not ./) and stripped the leading character via slice(1). This converted .continue/rules to continue/rules, which doesn't exist, causing the tool to error with "Directory not found."

The fix removes this faulty condition. The downstream resolveInputPath and resolveRelativePathInDir functions handle dot-prefixed paths correctly without any preprocessing.

Fixes #10466

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Tests

  • Added test: hidden directory paths (.continue/rules) are preserved
  • Added test: hidden directory names (.git) are preserved
  • Added test: parent directory references (.., ../foo) are preserved
  • All 12 existing + new lsTool tests pass

🤖 Generated with Claude Code (issue-hunter-pro)


Continue Tasks: ✅ 1 no changes — View all


Summary by cubic

Preserves leading dots in ls tool path resolution so hidden directories (.continue/rules, .git) and parent refs (.., ../foo) work without errors. Removed the stripping logic and added tests to cover these cases.

Written for commit deac90f. Summary will update on new commits.

The `resolveLsToolDirPath` function incorrectly stripped leading dots
from paths like `.continue/rules`, converting them to `continue/rules`
which doesn't exist. This broke the ls tool for any hidden directory.

Remove the faulty condition that matched paths starting with "." but
not "./" and stripped their first character. The path resolver handles
these paths correctly without preprocessing.

Fixes continuedev#10466

Co-Authored-By: Claude <noreply@anthropic.com>
@zerone0x zerone0x requested a review from a team as a code owner February 14, 2026 10:46
@zerone0x zerone0x requested review from sestinj and removed request for a team February 14, 2026 10:46
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 14, 2026
@github-actions
Copy link

github-actions bot commented Feb 14, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@zerone0x
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

ls tool doesn't support path .continue/rules

1 participant