cline icon indicating copy to clipboard operation
cline copied to clipboard

Unable to do a recursive search

Open akshaybabloo opened this issue 9 months ago • 2 comments

What happened?

I am using anthropics Claude 4 sonnet, and I have a folder structure something like this

.
├── /api/
│   ├── /pkg/
│   │   ├── auth/
│   │   │   └── default.go
│   │   └── something/
│   │       └── default.go
│   ├── /server
│   │   ├── /auth
│   │   │   └── default.go
│   │   └── default.go
│   ├── main.go
│   ├── go.mod
│   └── go.sum
├── README.md
└── LICENSE

[!NOTE] No files under api/pkg/ but it has folders in it which in turn contains files

Cline thinks that api/pkg/ folder is empty and it's not able to do a recursive walk. I tried adding default.go under api/pkg/ folder and it still says that api/pkg/ is empty. It is able to get api/server/ files/folder correctly.

Steps to reproduce

  1. Create a new Go project with main.go under api/ folder (not the root folder)
  2. Create a folder called api/pkg/ without any files in it
  3. Under api/pkg/ create a new folder with file called hello/default.go (or anything)
  4. Import the code into main.go
  5. Instruct Cline to give you feedback

Relevant API REQUEST output

Screenshot below

Image

Provider/Model

cline-sonnet-4-20250514

Operating System

Windows 11

System Info

None.

Cline Version

3.18.0

Additional context

This could be because of pkg folder is being ignored in your code?

https://github.com/cline/cline/blob/01d3afe0c514d757b72116640837eba5580749df/src/services/glob/list-files.ts#L7-L23

akshaybabloo avatar Jun 26 '25 11:06 akshaybabloo

Hey, thanks for the detailed issue.

Yeah, this hardcoded list has started to become a pain, probably time to get rid of it.

celestial-vault avatar Jun 27 '25 16:06 celestial-vault

I agree. Probably have a settings area where we can tick/untick things we want tp ignore. Or use .vscode/ to add in a settings area with ignore list. Not really sure which one would be better.

akshaybabloo avatar Jun 27 '25 23:06 akshaybabloo

Hi @akshaybabloo sorry for this issue getting stale, do you mind creating a feature request on our discussions board so that we can get around to it at some point? Specifically calling out that you want the ability to modify the ignored directories when Cline looks at project structure. https://github.com/cline/cline/discussions/categories/feature-requests

saoudrizwan avatar Jul 26 '25 13:07 saoudrizwan