MTA Developer Lightspeed
Using the Migration Toolkit for Applications Developer Lightspeed to modernize your applications
Abstract
Making open source more inclusive
Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.
Chapter 1. Using MTA with Developer Lightspeed in IDE
You must configure the following settings in Red Hat Developer Lightspeed for migration toolkit for applications:
- Visual Studio Code IDE settings.
- Profile settings that provide context before you request a code fix for a particular application.
1.1. Configuring the Developer Lightspeed for MTA IDE settings
After you install the MTA extension in Visual Studio (VS) Code, you must provide your large language model (LLM) credentials to activate Developer Lightspeed for MTA settings in Visual Studio (VS) Code.
Developer Lightspeed for MTA settings are applied to all AI-assisted analysis that you perform by using the MTA extension. The extension settings can be broadly categorized into debugging and logging, Developer Lightspeed for MTA settings, analysis related settings, and solution server settings.
Prerequisites
- You installed the Migration Toolkit for Applications (MTA) extension version 8.0.0 in VS Code.
- You completed the solution server configurations in Tackle custom resource if you opt to use solution server.
- You installed the MTA version 8.0.0 in your system.
- You installed the latest version of Language Support for Java™ by Red Hat extension in VS Code.
- You installed Jave 17+ and Maven 3.9.9+ in your system.
- You installed Git and add it to the $PATH variable.
Procedure
Go to the Developer Lightspeed for MTA settings in one of the following ways:
-
Click
Extensions > MTA CLI Extension for VSCode > Settings
-
Type
Ctrl + Shift + P
on the search bar to open the Command Palette and enterPreferences: Open Settings (UI)
. Go toExtensions > MTA
to open the settings page.
-
Click
- Configure the settings described in the following table:
Table 1.1. Developer Lightspeed for MTA settings
Settings | Description |
---|---|
Log level |
Set the log level for the MTA binary. The default log level is |
RPC Server Path |
Displays the path to the solution server binary. If you do not modify the path, Developer Lightspeed for MTA uses the bundled binary. |
Analyzer path |
Specify a MTA custom binary path. If you do not provide a path, Developer Lightspeed for MTA uses the default path to the binary. |
Solution Server:URL |
Configure the URL of the Solution Server end point. This field has the default URL. |
Solution Server:enabled |
Enable the Solution Server client (MTA extension) to connect to the Solution Server to perform analysis. |
Solution Server:Auth |
Enable authentication for the Solution Server. |
Solution Server:Auth Realm |
Enter the name of the Keycloak realm for Solution Server. If you enabled authentication for the Solution Server, you must configure a Keycloak realm to allow clients to connect to the Solution Server. An administrator can configure SSL for the realm. |
Solution Server: Auth Insecure |
This option is enabled by default to skip SSL certificate verification when clients connect to the Solution Server. Disable the setting to allow secure connections to the Solution Server. |
Analyze on save |
Enable this setting for Developer Lightspeed for MTA to run an analysis on a file that is saved after code modification. This setting is enabled automatically when you enable Agentic AI mode. |
Diff editor type |
Select from diff or merge view to review the suggested solutions after running an analysis. The diff view shows the old code and a copy of the code with changes side-by-side. The merge view overlays the changes in the code in a single view. |
Gen AI:Enabled |
This option is enabled by default. It enables you to get code fixes by using Developer Lightspeed for MTA with a large language model. |
Diff:Auto Accept On Save |
This option is enabled by default. When you accept the changes suggested by the LLM, the updated code is saved automatically in a new file. Disable this option if you want to manually save the new file after accepting the suggested code changes. |
Agent mode |
Enable the experimental Agentic AI flow for analysis. Developer Lightspeed for MTA runs an automated analysis of a file to identify issues and suggest resolutions. After you accept the solutions, Developer Lightspeed for MTA makes the changes in the code and re-analyzes the file. |
Excluded diagnostic sources |
Add diagnostic sources in the |
Cache directory |
Specify the path to a directory in your filesystem to store cached responses from the LLM. |
Demo mode |
Enable to run Developer Lightspeed for MTA in demo mode that uses the LLM responses saved in the |
Trace enabled |
Enable to trace MTA communication with the LLM model. Traces are stored in the |
Debug:Webview |
Enable debug level logging for Webview message handling in VS Code. |
Analyze dependencies |
Enable Developer Lightspeed for MTA to analyze dependency-related errors detected by the LLM in your project. |
Analyze known libraries |
Enable Developer Lightspeed for MTA to analyze well-known open-source libraries in your code. |
Code snip limit |
Set the maximum number of lines of code that are included in incident reports. |
Context lines |
Configure the number of context lines included in incident reports. The greater the number, the more the LLM accuracy. |
Incident limit |
Specifies the maximum number of incidents to be reported. If you enter a higher value, it increases the coverage of incidents in your report. |
1.2. Configuring the Developer Lightspeed for MTA profile settings
Starting with Migration Toolkit for Applications (MTA) 8.0.0, you can use the Visual Studio Code plugin to run an analysis to discover issues in the code. You can optionally enable Red Hat Developer Lightspeed for migration toolkit for applications to get AI-assisted code suggestions.
To generate code changes using Developer Lightspeed for MTA, you must configure a profile that contains all the necessary configurations, such as source and target technologies and the API key to connect to your chosen large language model (LLM).
Prerequisites
- You installed the Migration Toolkit for Applications (MTA) extension version 8.0.0 in VS Code.
- You completed the solution server configurations in Tackle custom resource if you opt to use solution server.
- You installed the MTA version 8.0.0 in your system.
- You installed the latest version of Language Support for Java™ by Red Hat extension in VS Code.
- You installed Jave 17+ and Maven 3.9.9+ in your system.
- You installed Git and add it to the $PATH variable.
- You opened a Java project in your VS Code workspace.
Procedure
Open the
Konveyor View Analysis
page in either of the following ways:-
Click the screen icon on the
Konveyor Issues
pane of the MTA extension. -
Type
Ctrl + Shift + P
on the search bar to open the Command Palette and enterKonveyor:Open Konveyor Analysis View
.
-
Click the screen icon on the
Click the settings button on the
Konveyor View Analysis
page to configure a profile for your project. TheGet Ready to Analyze
pane lists the follwoing basic configurations required for an analysis:Verification
After you complete the profile configuration, close the
Get Ready to Analyze
pane. You can verify that your configuration works by running an analysis. See run an analysis.
Table 1.2. Developer Lightspeed for MTA profile settings
Profile settings | Description |
---|---|
Select profile |
Create a profile that you can reuse for multiple analyses. The profile name is part of the context provided to the LLM for analysis. |
Configure label selector |
A label selector filters rules for analysis based on the source or target technology. Specify one or more target or source technologies (for example, cloud-readiness). Developer Lightspeed for MTA uses this configuration to determine the rules that are applied to a project during analysis. If you mentioned a new target or a source technology in your custom rule, you can type that name to create and add the new item to the list. Note You must configure either target or source tehcnologies before running an analysis. |
Set rules |
Enable default rules and select your custom rule that you want MTA to use for an analysis. You can use the custom rules in addition to the default rules. |
Configure generative AI |
This option opens the |