forked from aws/aws-toolkit-jetbrains
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge AWS Builder ID/SSO feature into feature/vector branch (aws#1083)
* (feat codewhisperer) bump ideProfilename (aws#988) * bump ideProfilename * *update codewhisperer service model and bump sdk version (aws#991) * update cwspr model v2 (aws#1001) * Cwspr sso client adaptor (aws#995) * cwspr login dialog prototype (aws#990) * fix not IAM comment not grayed out (aws#1006) * cwspr nodes UX update (aws#1005) * Cwspr setting panel grayout (for sso user) (aws#1000) * fix transformation (aws#1009) * (feat codewhisperer) credentail impl (aws#1003) * remove all usage of clientManager.getClient (aws#1015) * update codewhisperer model -- reference filter (aws#1020) * remove accountless token ux compoentns (aws#1013) * merge conflict resolve * (feat codewhisperer) remove reference filter logic (aws#1017) * (feat codewhisperer) remove codewhisperer from toolkit experimental feature (aws#1018) * empty commit to trigger build * (feat codewhisperer) credential flow integration (aws#1014) * fix compile error caused by missing * Some adaption to new auth logic from Toolkit * adapt to Toolkit's bearer credential flow * update test case for connectionSettings() and some cleanup * detekt fix * Remove accidentally added changes * (codewhisperer) cleanup and chores (aws#1037) * clean up codewhisperer constants duplicate Sono/Sso settings * remove redundant logics in codewhispererEndpointCustomizer * add logic to handle user choose SSO login with AWS ID url * Fix CodeWhispererCredentialManagerTest * (codewhisperer) fix bugs (aws#1039) * (codewhisperer) codewhisperer usage limit hit for free tier users UX flow (aws#1044) * finish indifividual UX components for usage limit hit case, integration[WIP] * initial commits of usage limit UX components, integration logics[WIP] * add UX integration * add notificationError and todos * add back deleted import * small fix -- only show error message on manual trigger * (codewhisperer) access notification and logics implementation (aws#1041) * accless notification and logics impmlementation * address comments * update timer API usage * detekt fix * small fix * small fix * small tweak to prevent listener get installed > 1 times * detekt fix * Update How to user CodeWhisperer markdown (aws#1060) * Use local gif for HowToUseCodeWhisperer (aws#1063) * (codewhisperer) integration with new Toolkit API, UX (profile switcher, logout) (aws#1055) * Only show the hint text when CodeWhisperer is using secondary connection (aws#1068) * update accless expiration date (aws#1073) * (codewhisperer) several small fix (aws#1070) * * Toolkit SSO action grouop help action imple * show toast infomation when user ack codewhisperer to keep using SSO connection in the background * small fix * localize redirect URL * fix typo Co-authored-by: andrewyuq <[email protected]> * (codewhisperer) sso display name (aws#1074) * sso display name * updade display format * both SSO/Sono will show Connected with... Co-authored-by: andrewyuq <[email protected]> * (codewhisperer) fix test class CodeWhispererClientTest (aws#1072) * fix test class CodeWhispererClientTest * * fix sigv4 client pointing to gamma * add comment * fix naming convention Co-authored-by: andrewyuq <[email protected]> * (codewhisperer) add telemetry for login click events (aws#1081) * (codewhisperer) SSO connection expire fix (aws#1075) * fix when SSO connection expires, login will never try reauth and return the same one * fix broken test * update comment * Addressing the comment * Fix tests Co-authored-by: andrewyuq <[email protected]> Co-authored-by: yuxqiang <[email protected]> * (codewhisperer) fix broken code scan test class (aws#1069) * fix broken test cases * revert change added accidentally * detekt fix Co-authored-by: andrewyuq <[email protected]> Co-authored-by: Richard Li <[email protected]> * (feat codewhisperer) sso ux tooltip (aws#989) * cwspr tooltip * anchor tooltip location to dev tool tab component * remove TODO * detekt fix * replace description text * Update jetbrains-core/src/software/aws/toolkits/jetbrains/core/explorer/AwsToolkitExplorerToolWindow.kt Co-authored-by: Richard Li <[email protected]> * Address comments Co-authored-by: yuxqiang <[email protected]> Co-authored-by: andrewyuq <[email protected]> Co-authored-by: Richard Li <[email protected]> * (codewhisperer) UX improvement SSO expire (aws#1076) * when user try to reauth with given conneciton, fill in the required metadata in the login dialog for users * detekt fix * detekt fix * NPE fix * detekt fix * when user try to reauth with given conneciton, fill in the required metadata in the login dialog for users * detekt fix * detekt fix * NPE fix * detekt fix * Address comments * Sneak in two text changes * One more text change Co-authored-by: andrewyuq <[email protected]> Co-authored-by: yuxqiang <[email protected]> * Fix test integration failures Co-authored-by: aws-toolkit-automation <43144436+aws-toolkit-automation@users.noreply.github.com> Co-authored-by: Will Lo <[email protected]> Co-authored-by: Shao-Hua Lo <[email protected]> Co-authored-by: Richard Li <[email protected]> Co-authored-by: Richard Li <[email protected]>
- Loading branch information
1 parent
dc88940
commit 20c1ad7
Showing
83 changed files
with
4,580 additions
and
1,347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## Using Amazon CodeWhisperer | ||
|
||
CodeWhisperer uses machine learning to generate code suggestions from the existing code and comments in your IDE. | ||
Supported languages include: **Java, Python, JavaScript, C# and TypeScript**. | ||
|
||
--- | ||
|
||
### Navigating with the tab and arrow keys | ||
|
||
As you enter your code, CodeWhisperer will offer inline code suggestions. Use **TAB to accept** a suggestion. | ||
CodeWhisperer may provide multiple suggestions to choose from. Use **[left arrow] and [right arrow] to navigate** | ||
between suggestions. | ||
|
||
If you don’t like the suggestions you see, keep typing (or hit ESC). The suggestions will disappear, and | ||
CodeWhisperer will generate new ones at a later point based on the additional context. | ||
|
||
<img src="example.gif" style="max-height:400px;" alt="example"> | ||
|
||
--- | ||
|
||
### Requesting suggestions manually | ||
|
||
You can request suggestions at any time. Use **Option-C** on Mac or **ALT-C** on Windows. After you receive | ||
suggestions, use TAB to accept and arrow keys to navigate. | ||
|
||
--- | ||
|
||
### Getting the best recommendations | ||
|
||
For best results, follow these practices. | ||
* Give CodeWhisperer something to work with. The more code your file contains, the more context CodeWhisperer | ||
has for generating recommendations. | ||
* Write descriptive comments. “Function to upload a file to S3” will get better results than “Upload a file”. | ||
* Specify the libraries you prefer by using import statements. | ||
* Use descriptive names for variable and functions. A function called “upload_file_to_S3” will get better results | ||
than a function called “file_upload”. | ||
* Break down complex tasks into simpler tasks. | ||
|
||
--- | ||
|
||
### Further reading | ||
|
||
To learn more about working with CodeWhisperer and JetBrains, see [Amazon CodeWhisperer | ||
for JetBrains and the AWS Toolkit](https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/codewhisperer.html). | ||
|
||
--- | ||
|
||
### Providing feedback | ||
|
||
CodeWhisperer is in preview. Let us know what you think by sharing feedback (using the AWS Toolkit feedback button) | ||
or by reaching out to [[email protected]](mailto:[email protected]). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
jetbrains-core/resources/codewhisperer/WelcomeToCodeWhisperer.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...s-core/src/software/aws/toolkits/jetbrains/core/credentials/SsoConnectionExpiredDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package software.aws.toolkits.jetbrains.core.credentials | ||
|
||
import com.intellij.ide.BrowserUtil | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.openapi.ui.DialogWrapper.CANCEL_EXIT_CODE | ||
import com.intellij.openapi.ui.DialogWrapper.OK_EXIT_CODE | ||
import com.intellij.openapi.ui.Messages | ||
import software.aws.toolkits.resources.message | ||
import java.net.URI | ||
|
||
class SsoConnectionExpiredDialog(private val project: Project, private val connection: ToolkitConnection?) { | ||
fun show() { | ||
val res = Messages.showYesNoCancelDialog( | ||
project, | ||
message("toolkit.sso_expire.dialog_message"), | ||
message("toolkit.sso_expire.dialog.title"), | ||
message("toolkit.sso_expire.dialog.yes_button"), | ||
message("toolkit.sso_expire.dialog.no_button"), | ||
message("toolkit.sso_expire.dialog.cancel_button"), | ||
Messages.getWarningIcon() | ||
) | ||
|
||
when (res) { | ||
OK_EXIT_CODE -> { ToolkitAddConnectionDialog(project, connection).show() } | ||
CANCEL_EXIT_CODE -> { | ||
// TODO: update if needed | ||
BrowserUtil.browse(URI("https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/codewhisperer.html")) | ||
} | ||
else -> {} | ||
} | ||
} | ||
} |
Oops, something went wrong.