Configuring how code suggestions are displayed
watsonx Code Assistant
Watsonx Code Assistant checks whether a generated code suggestion is similar to other code sources.
The generated code must be 10 or more lines in these languages:
- C
- C++
- Go
- Java
- JavaScript
- Python
- TypeScript
By default, watsonx Code Assistant blocks code suggestions that are similar to other code sources. You can set whether code suggestions that are similar to code from specific licenses are displayed in the IDE with a reference to the similar code source and its license.
The code suggestion display is set per license. The following table lists the code similarity settings and a description of each:
Setting | Description |
---|---|
Block code suggestion (default) | No code suggestion |
Show code suggestion with reference | Show the code suggestion with a license reference |
IBM recommends that you block the display of code suggestions that are similar to other code sources. If you choose to show code suggestions that are similar to other code sources with a reference, your eligibility for contractual IP protection (if available) under your customer agreement might be affected.
To change settings:
-
Open your watsonx Code Assistant instance.
-
On the home page, click the Settings for code generation licenses tile.
-
Select the licenses that you want to change.
-
Click the setting in the action bar. The action bar choices are Block or Show with reference.
For a list of licenses that can be configured, see the Code suggestion license reference.