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 a service for checking Cody Ignore policy and decorate some UI with ignored status #1379

Merged
merged 5 commits into from
Apr 25, 2024

Conversation

dominiccooney
Copy link
Contributor

@dominiccooney dominiccooney commented Apr 24, 2024

This change is integrated through Agent, but the extension side is not integrated with server-set policy yet. Instead, this change uses a testing hook which pushes an ad-hoc policy to the extension—see the test plan.

As a result, this does not cause any user visible change for Enterprise users yet. For self-serve users of the experimental file-based Cody Ignore feature, this UX may trigger until extension-side integration is complete. However we have determined that to be very few users.

Exact UX is still being designed. These labels and icons are placeholders.

Part of #1252, #1253.

Test plan

Tested manually:

  1. Run the extension with CODY_JETBRAINS_FEATURES=cody.feature.internals-menu=true and open some files, say Foo.java and Bar.go
  2. Status bar, Internals, Testing: Cody Ignore
  3. Check "Override policy for testing", set URI regex to \.java$. OK.
  4. Verify that a banner appears in Foo.java but not Bar.go.
  5. Run a command like Explain Code with the right click context menu and verify that a notification appears
  6. Run a command like Explain Code with a keyboard shortcut like ctrl-shift-E and verify that a notification appears
  7. Verify when focus switches from Foo.java to Bar.go, a slashed Cody icon appears in the status bar when an ignored file is focused.

@dominiccooney dominiccooney requested a review from a team April 24, 2024 04:06
* autocomplete, etc. per policy.
*/
@Service(Service.Level.PROJECT)
class IgnoreOracle(private val project: Project) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmph.
rc24-duke-java-mascot

Copy link
Contributor

@pkukielka pkukielka left a comment

Choose a reason for hiding this comment

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

LGTM

@dominiccooney dominiccooney enabled auto-merge (squash) April 25, 2024 07:23
@dominiccooney dominiccooney merged commit 4673596 into main Apr 25, 2024
6 checks passed
@dominiccooney dominiccooney deleted the dpc/ignore-oracle branch April 25, 2024 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants