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

Auto trigger revamp #4958

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Auto trigger revamp #4958

wants to merge 5 commits into from

Conversation

andrewyuq
Copy link
Contributor

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

andrewyuq and others added 5 commits October 4, 2024 09:41
* Track SessionContext instead of InvocationContext

1. Since the shift from displaying one trigger at a time
to displaying multiple triggers at a time, use SessionContext
as the disposable for the session states.
2. Introduce the concept of "display session" which can show
multiple triggers at a time and sessionContext is to hold states
for that session.
3. ongoingRequests will be a map of <jobId, InvocationContext>
where InvocationContext is the state of each trigger.
4. Managed these states globally by dynamically adding Trigger states
into ongoingRequests and whenever the user made a decision(accept or
reject), conclude decisions for all the ongoing triggers and clear
ongoingRequest, so that a new display session can start later.

* address comments
…ngs (#4914)

* Replace old actions with new actions that have configurable key bindings

1. Accept (Tab)
2. Force Accept (Opt + Tab/Opt + Enter)
3. Navigate to Previous (Opt + [)
4. Navigate to Next (Opt + ])

* put sessionConext as project userdata and remove states of the actions

* add popup keybinding hint and settings hyperlink

* Addressing comments
* AutoTrigger logic tiny refactor

1. remove triggerOnIdle type code
2. address comments from previous PR

* Update plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererAutoTriggerService.kt

Co-authored-by: Richard Li <[email protected]>

---------

Co-authored-by: Richard Li <[email protected]>
* telemetry changes

1. UserTriggerDecision can now have Ignore and Unseen,
(will later change to a new "MERGED" state indicating those
other trigger results not accepted or rejected in the same display
session)

* address comments

* address comments
…#4941)

* Make CW popup showing on hover and IntelliSense popup non-conflicting

1. CW popup is hidden by default, on hovering over the suggestion text
it will show.
2. On hovering over the suggestion, IntelliSense popup(if it's showing)
will increase it's alpha to 0.8
3. Upon typing, if not hovering on the suggestion text, make CW hidden
and IntelliSense not transparent.

* add SessionContext as the dispoable for its subscriber in init

* address comments
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.

1 participant