CodeWhisperer's features are becoming a part of Amazon Q Developer. Learn more
Line-by-line recommendations
Depending on your use case, CodeWhisperer may not be able to generate an entire function block
in one recommendation. However, CodeWhisperer can still provide line-by-line recommendations.
- JetBrains
-
In this example using Go and GoLand, CodeWhisperer provides line-by-line recommendations.
Here is another example of line-by-line recommendations using Go and GoLand, this time with a unit test.
In this example, CodeWhisperer provides line-by-line recommendations using C++ and CLion.
- Lambda
-
In the following image, the customer has written an initial comment indicating that they
want to publish a message to an Amazon CloudWatch Logs group. Given this context, CodeWhisperer is only able to
suggest the client initialization code in its first recommendation, as shown in the following
image.
However, if the user continues to request line-by-line recommendations, CodeWhisperer also
continues to suggest lines of code based on what's already been written.
In the example above, VPCFlowLogs
may not be the correct constant value. As
CodeWhisperer makes suggestions, remember to rename any constants as required.
CodeWhisperer can eventually complete the entire code block as shown in the following
image.
- SageMaker Studio
-
In this example using Python and SageMaker Studio, CodeWhisperer provides recommendations, one line at at time.