-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance workspace.findFiles to Support Absolute Paths with Ignore Patterns #989
Comments
@username The current implementation of To address this need, we could enhance the API to accept both relative and absolute paths. Additionally, it would be beneficial to include support for ignore patterns to filter out unwanted files or directories during the search. Here’s a potential enhancement: const allFiles = await workspace.findFiles(
{
"include": "/Users/anrgct/workspace/genaiscript/packages/sample/genaisrc/samples/**/*.{js,mjs,ts,mts}",
"ignore": "**/.git/**,**/node_modules/**"
}
); This revised method would allow you to specify both include and ignore patterns and could handle absolute paths seamlessly. We should also ensure that the documentation reflects these changes clearly. Thoughts?
|
The limitation to relative files is technical debt from when we ran inside VSCode using the virtualized workspace file system; there's no real reason to be limited to relative paths anymore. |
The latest version supports settings a "ignore" option which is fed into the ignore package. |
|
Does
workspace.findFiles
not support absolute paths? Can the API be modified to support absolute paths while also allowing the input of ignore patterns? This method is very convenient for retrieving files.The text was updated successfully, but these errors were encountered: