Unable to do a recursive search
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
- Create a new Go project with main.go under
api/folder (not the root folder) - Create a folder called
api/pkg/without any files in it - Under
api/pkg/create a new folder with file calledhello/default.go(or anything) - Import the code into
main.go - Instruct Cline to give you feedback
Relevant API REQUEST output
Screenshot below
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
Hey, thanks for the detailed issue.
Yeah, this hardcoded list has started to become a pain, probably time to get rid of it.
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.
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