continue icon indicating copy to clipboard operation
continue copied to clipboard

why '.' in listTool is thought to be the root directory '/'

Open luzhihaoTestingLab opened this issue 11 months ago • 3 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 11
- Continue version: 1.5.26
- IDE version: vs code 1.107.0
- Model: claude code sonnet 4.5

Description

core/tools/implementations/lsTool.ts 8-11 line:

export function resolveLsToolDirPath(dirPath: string | undefined) {
  if (!dirPath || dirPath === ".") {
    return "/";
  }

I think this would be better:

export function resolveLsToolDirPath(dirPath: string | undefined) {
  if (!dirPath || dirPath === ".") {
    return "current workspace's related path";
  }

To reproduce

No response

Log output


luzhihaoTestingLab avatar Dec 12 '25 02:12 luzhihaoTestingLab

Related issues:

  • #8877 - ls tool can list os file system root contents when policy is set to "Automatic" and dirPath is '.'

continue avatar Dec 12 '25 02:12 continue

I am seconding this, as it's a security issue and I am also having this exact issue

Icewav3 avatar Dec 12 '25 05:12 Icewav3

Fixed by https://github.com/continuedev/continue/pull/9428

RomneyDa avatar Jan 28 '26 07:01 RomneyDa