CodeWhisperer's features are becoming a part of Amazon Q Developer. Learn more
Single-line code completion
When you start typing out single lines of code, CodeWhisperer makes suggestions based on your current and previous inputs.
- AWS Toolkit for Visual Studio Code
-
In this example using JavaScript and VS Code, CodeWhisperer completes a line of code that the developer begins.
In this example using TypeScript and VS Code, the user enters a full comment, and then CodeWhisperer supplies the code that goes with it.
In this example, CodeWhisperer provides a single-line recommendation based on a comment, using C# and VS Code.
- AWS Toolkit for JetBrains
-
In the image below, using a shell script written in IntelliJ, CodeWhisperer offers recommendations on how to complete a single line of code.
- Lambda
-
When you start typing out single lines of code, CodeWhisperer makes suggestions based on your current and previous inputs. In the image below, a user has begun to define a variable for an Amazon S3 client. Based on this, CodeWhisperer then suggests a way to complete this line of code.
As another example, in the image below, a user has already written some code, and now wants to send a message to an Amazon SQS queue. CodeWhisperer suggests a way to complete this final line of code.
- AWS Cloud9
-
When you start typing out single lines of code, CodeWhisperer makes suggestions based on your current and previous inputs.
In the example below, in Java, a user enters the string
public
into an existing class.Based on the input, CodeWhisperer generates a suggestion for the signature of the main method.
- SageMaker Studio
-
In this example using Python and SageMaker Studio, CodeWhisperer recommends a single line of code, based on the developer's comment.