You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
const allFiles = await workspace.findFiles("/Users/anrgct/workspace/genaiscript/packages/sample/genaisrc/samples/**/*.{js,mjs,ts,mts}")
// path should be a `path.relative()`d string, but got "/Users/anrgct/workspace/genaiscript/packages/cli/src/worker.ts"
The text was updated successfully, but these errors were encountered:
The current implementation of workspace.findFiles indeed expects relative paths rather than absolute paths, which can be limiting when dealing with deep directory structures.
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.
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.
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.
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: