Pass fewer snippets to suspicious commands #1151
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This re-enables suspicious commands. Closes #1038
The main difference is in these lines https://github.com/stacklok/codegate/pull/1151/files#diff-0658dbd5db53af1b59ad53ac8ce9dc0ba40042abea62cce7f6b04eebf3fa4cffR56-R59
It should no longer mess with edits mode on copilot. Also, it should no longer apply if the language is any of
I see the secrets warning occasionally, as per #1038, but it is not going through the suspicious commands code.
I tested this quite a lot on co-pilot, but not the other assistants. The accuracy for unfamiliar commands needs improvement.