Skip to content
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

Add preference to ignore files in workspace functions #14449

Merged
merged 7 commits into from
Nov 14, 2024
Merged

Conversation

JonasHelming
Copy link
Contributor

fixed #14448

What it does

adds two settings to specify fles an directories to be ignored by the workspace functions:

  • gitignore : Will respect the gitignore file
  • User defined list of files or folders

How to test

Ignore files in both settings. Ask the workspace agent "is the a file/folder XYZ in the workspace". Specifically change the .gitignore at runtime to test file watching.

Review checklist

Reminder for reviewers

Copy link
Contributor

@planger planger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thank you! The "User Excludes" seem to work very well.

However, in my tests the Git Ignore exclusion doesn't seem to work for the getWorskpaceFileList function:

image

A few minors:

  • The title "Worskpace-function" stands out a bit, because it is the only pref title that uses a "-". In general, I think the labels are not very nice if they are camel-cased. I created a separate ticket on that (Improve AI settings labels #14452)
  • I think we should name the preference about user excludes more from the perspective of the user, e.g. "Excluded File Patterns" is better?

@JonasHelming
Copy link
Contributor Author

@planger I tried to adress all comments.
However, about the described Bug that .gitignore is not respected, I failed to reproduce this. Can you point me to the repo where you tried this?

@planger planger self-requested a review November 14, 2024 13:45
Copy link
Contributor

@planger planger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the revision! Looks much cleaner now imho!

Please see two more suggestions inline, also regarding the bug I observed. Eitherway, I'm fine with the current state, even though I think my suggestions make sense.

Edit: One more nit... I'd find it better to make the private methods protected, this way, adopters can overwrite them.

JonasHelming and others added 3 commits November 14, 2024 15:43
Downgraded minimatch for Node 18 compatibility

Signed-off-by: Jonas Helming <[email protected]>
@JonasHelming JonasHelming merged commit be43deb into master Nov 14, 2024
11 checks passed
@github-actions github-actions bot added this to the 1.56.0 milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Theia AI] User setting for ignore files in Workspace functions (including considering .gitignore)
2 participants