diff --git a/docs/topics/developer-lightspeed/assembly_configuring-dev-lightspeed-ide.adoc b/assemblies/developer-lightspeed-guide/assembly_configuring-dev-lightspeed-ide.adoc similarity index 50% rename from docs/topics/developer-lightspeed/assembly_configuring-dev-lightspeed-ide.adoc rename to assemblies/developer-lightspeed-guide/assembly_configuring-dev-lightspeed-ide.adoc index d73a179a..e9ab31a0 100644 --- a/docs/topics/developer-lightspeed/assembly_configuring-dev-lightspeed-ide.adoc +++ b/assemblies/developer-lightspeed-guide/assembly_configuring-dev-lightspeed-ide.adoc @@ -11,19 +11,21 @@ endif::[] ifdef::context[] [id="configuring-dev-lightspeed-ide_{context}"] endif::[] -= Using {ProductShortName} with Developer Lightspeed in IDE += Using {ProductShortName} with Developer Lightspeed in an IDE :context: configuring-dev-lightspeed-ide [role="_abstract"] -You must configure the following settings in {mta-dl-full}: +As a Migrator, you must configure the Visual Studio Code Integrated Development Environment (IDE) to use the {mta-dl-full} plugin to run application analyses and generate code resolution suggestions. + +You must configure the following settings in {mta-dl-plugin}: * Visual Studio Code IDE settings. -* Profile settings that provide context before you request a code fix for a particular application. +* Profile settings that give context before you request a code fix for a particular application. -include::proc_configuring-developer-lightspeed-ide-settings.adoc[leveloffset=+1] +include::topics/developer-lightspeed/proc_configuring-developer-lightspeed-ide-settings.adoc[leveloffset=+1] -include::proc_configuring-developer-profile-settings.adoc[leveloffset=+1] +include::topics/developer-lightspeed/proc_configuring-developer-profile-settings.adoc[leveloffset=+1] ifdef::parent-context-of-configuring-dev-lightspeed-ide[:context: {parent-context-of-configuring-dev-lightspeed-ide}] ifndef::parent-context-of-configuring-dev-lightspeed-ide[:!context:] diff --git a/docs/topics/developer-lightspeed/assembly_configuring_llm.adoc b/assemblies/developer-lightspeed-guide/assembly_configuring_llm.adoc similarity index 57% rename from docs/topics/developer-lightspeed/assembly_configuring_llm.adoc rename to assemblies/developer-lightspeed-guide/assembly_configuring_llm.adoc index 797c7344..80cbe2eb 100644 --- a/docs/topics/developer-lightspeed/assembly_configuring_llm.adoc +++ b/assemblies/developer-lightspeed-guide/assembly_configuring_llm.adoc @@ -17,9 +17,9 @@ endif::[] [role="_abstract"] {mta-dl-plugin} provides the large language model (LLM) with the contextual prompt, migration hints, and solved examples to generate suggestions for resolving issues identified in the current code. -{mta-dl-plugin} is designed to be model agnostic. It works with LLMs that are run in different environments (in local containers, as local AI, or as a shared service) to support analyzing Java applications in a wide range of scenarios. You can choose an LLM from well-known providers, local models that you run from Ollama or Podman desktop, and OpenAI API compatible models. +{mta-dl-plugin} is model agnostic. It works with LLMs that are run in different environments (in local containers, as local AI, or as a shared service) to support analyzing Java applications in a wide range of scenarios. You can choose an LLM from well-known providers, local models that you run from Ollama or Podman desktop, and OpenAI API compatible models. -The code fix suggestions produced to resolve issues detected through an analysis depend on the LLM's capabilities. +The code fix suggestions that the LLM produces to resolve issues from an analysis depend on the LLM's capabilities. You can run an LLM from the following generative AI providers: @@ -34,11 +34,11 @@ You can also run OpenAI API-compatible LLMs deployed as: * A service in your {ocp-name} AI cluster * Locally in the Podman AI Lab in your system. -include::con_llm-service-openshift-ai.adoc[leveloffset=+1] +include::topics/developer-lightspeed/con_llm-service-openshift-ai.adoc[leveloffset=+1] -include::ref_llm-provider-configurations.adoc[leveloffset=+1] +include::topics/developer-lightspeed/ref_llm-provider-configurations.adoc[leveloffset=+1] -include::proc_configuring-llm-podman-desktop.adoc[leveloffset=+1] +include::topics/developer-lightspeed/proc_configuring-llm-podman-desktop.adoc[leveloffset=+1] ifdef::parent-context-of-configuring-llm[:context: {parent-context-of-configuring-llm}] ifndef::parent-context-of-configuring-llm[:!context:] diff --git a/assemblies/developer-lightspeed-guide/assembly_getting-started.adoc b/assemblies/developer-lightspeed-guide/assembly_getting-started.adoc index 5afda620..5eaad927 100644 --- a/assemblies/developer-lightspeed-guide/assembly_getting-started.adoc +++ b/assemblies/developer-lightspeed-guide/assembly_getting-started.adoc @@ -16,10 +16,29 @@ endif::[] :context: getting-started [role="_abstract"] -The Getting started section contains information to walk you through the prerequisites, persistent volume requirements, installation, and workflows that help you to decide how you want to use {mta-dl-full}. +You can view prerequisites, persistent volume requirements, installation, and workflows that help you to decide how you want to use the {mta-dl-full}. +[NOTE] +==== +To get support for features in {mta-dl-plugin}, you require a Red Hat Advanced Developer Suite (RHADS) subscription. +==== + +include::topics/developer-lightspeed/con_prerequisites.adoc[leveloffset=+1] + +include::topics/developer-lightspeed/con_persistent-volumes.adoc[leveloffset=+1] + +include::topics/developer-lightspeed/con_installation.adoc[leveloffset=+1] + +include::topics/developer-lightspeed/con_developer-lightspeed-pathways.adoc[leveloffset=+1] + +include::topics/developer-lightspeed/proc_tackle-llm-secret.adoc[leveloffset=+1] + +include::topics/developer-lightspeed/proc_tackle-enable-llm-proxy.adoc[leveloffset=+1] + +include::topics/developer-lightspeed/ref_example-code-suggestion.adoc[leveloffset=+1] ifdef::parent-context-of-getting-started[:context: {parent-context-of-getting-started}] ifndef::parent-context-of-getting-started[:!context:] +:!getting-started: \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/assembly_run-dev-lightspeed-analysis.adoc b/assemblies/developer-lightspeed-guide/assembly_run-dev-lightspeed-analysis.adoc similarity index 78% rename from docs/topics/developer-lightspeed/assembly_run-dev-lightspeed-analysis.adoc rename to assemblies/developer-lightspeed-guide/assembly_run-dev-lightspeed-analysis.adoc index ebae276c..42d23420 100644 --- a/docs/topics/developer-lightspeed/assembly_run-dev-lightspeed-analysis.adoc +++ b/assemblies/developer-lightspeed-guide/assembly_run-dev-lightspeed-analysis.adoc @@ -16,20 +16,18 @@ endif::[] :context: run-dev-lightspeed-analysis [role="_abstract"] -After you complete the configurations, the next step is running an analysis to identify the issues in the code and generate suggestions to resolve the issues. You can get suggestions to fix code by using {mta-dl-full}. - -When you run an analysis, {ProductShortName} displays the issues in the *Analysis Results* view. +After you complete the configurations, the next step is running an analysis to identify the issues in the code and generate suggestions to resolve the issues. When you request code fix suggestions, {mta-dl-plugin} performs the following tasks: -* Streams LLM messages that describe the issue description, resolution, and the file in which the updates are applied. +* Streams LLM messages that describe the issue description, resolution, and the file in which {mta-dl-plugin} applies the updates. * Generates new files in the *Resolutions* pane. These files have the updates to the code to resolve the issues detected in the current analysis. You can review the changes, apply, or revert the updates. If you apply all the resolutions, {mta-dl-plugin} applies the changes and triggers another analysis to check if there are more issues. Subsequent analysis reports fewer issues and incidents. -include::proc_apply-rag-resolution.adoc[leveloffset=+1] +include::topics/developer-lightspeed/proc_apply-rag-resolution.adoc[leveloffset=+1] -include::proc_running-agent-analysis.adoc[leveloffset=+1] +include::topics/developer-lightspeed/proc_running-agent-analysis.adoc[leveloffset=+1] ifdef::parent-context-of-run-dev-lightspeed-analysis[:context: {parent-context-of-run-dev-lightspeed-analysis}] ifndef::parent-context-of-run-dev-lightspeed-analysis[:!context:] diff --git a/docs/topics/developer-lightspeed/assembly_understanding_dl.adoc b/assemblies/developer-lightspeed-guide/assembly_understanding_dl.adoc similarity index 66% rename from docs/topics/developer-lightspeed/assembly_understanding_dl.adoc rename to assemblies/developer-lightspeed-guide/assembly_understanding_dl.adoc index 00ff5a0b..c6ac4486 100644 --- a/docs/topics/developer-lightspeed/assembly_understanding_dl.adoc +++ b/assemblies/developer-lightspeed-guide/assembly_understanding_dl.adoc @@ -18,15 +18,15 @@ endif::[] [role="_abstract"] Understand the {mta-dl-full} extension features, use cases, configurations, and the benefits of using the extension with a large language model (LLM) to generate AI-assisted code resolutions when you want to refactor large codebases. -include::con_intro-to-developer-lightspeed.adoc[leveloffset=+1] +include::topics/developer-lightspeed/con_intro-to-developer-lightspeed.adoc[leveloffset=+1] -include::con_dl-context.adoc[leveloffset=+1] +include::topics/developer-lightspeed/con_dl-context.adoc[leveloffset=+1] -include::con_solution_server.adoc[leveloffset=+1] +include::topics/developer-lightspeed/con_solution_server.adoc[leveloffset=+1] -include::con_agent-ai.adoc[leveloffset=+1] +include::topics/developer-lightspeed/con_agent-ai.adoc[leveloffset=+1] -include::ref_dl-benefits.adoc[leveloffset=+1] +include::topics/developer-lightspeed/ref_dl-benefits.adoc[leveloffset=+1] ifdef::parent-context-of-understanding-dl[:context: {parent-context-of-understanding-dl}] diff --git a/docs/developer-lightspeed-guide/master.adoc b/docs/developer-lightspeed-guide/master.adoc index 042d59c5..e03986b2 100644 --- a/docs/developer-lightspeed-guide/master.adoc +++ b/docs/developer-lightspeed-guide/master.adoc @@ -2,7 +2,7 @@ include::topics/templates/document-attributes.adoc[] :_mod-docs-content-type: ASSEMBLY [id="mta-developer-lightspeed"] -= Configuring and Using Red Hat Developer Lightspeed for MTA += Configuring and using Red Hat Developer Lightspeed for MTA :toc: :toclevels: 4 @@ -11,16 +11,16 @@ include::topics/templates/document-attributes.adoc[] :context: mta-developer-lightspeed :mta-developer-lightspeed: -include::topics/developer-lightspeed/assembly_understanding_dl.adoc[leveloffset=+1] +include::assemblies/developer-lightspeed-guide/assembly_understanding_dl.adoc[leveloffset=+1] -include::topics/developer-lightspeed/assembly_getting-started.adoc[leveloffset=+1] +include::assemblies/developer-lightspeed-guide/assembly_getting-started.adoc[leveloffset=+1] -include::topics/developer-lightspeed/assembly_configuring_llm.adoc[leveloffset=+1] +include::assemblies/developer-lightspeed-guide/assembly_configuring_llm.adoc[leveloffset=+1] -include::topics/developer-lightspeed/assembly_configuring-dev-lightspeed-ide.adoc[leveloffset=+1] +include::assemblies/developer-lightspeed-guide/assembly_configuring-dev-lightspeed-ide.adoc[leveloffset=+1] -include::topics/developer-lightspeed/assembly_run-dev-lightspeed-analysis.adoc[leveloffset=+1] +include::assemblies/developer-lightspeed-guide/assembly_run-dev-lightspeed-analysis.adoc[leveloffset=+1] include::topics/developer-lightspeed/con_developer-lightspeed-logs.adoc[leveloffset=+1] -:!mta-developer-lightspeed: +:mta-developer-lightspeed!: diff --git a/docs/topics/developer-lightspeed/assembly_getting-started.adoc b/docs/topics/developer-lightspeed/assembly_getting-started.adoc deleted file mode 100644 index e4a8555b..00000000 --- a/docs/topics/developer-lightspeed/assembly_getting-started.adoc +++ /dev/null @@ -1,44 +0,0 @@ -:_newdoc-version: 2.18.3 -:_template-generated: 2025-05-28 - -ifdef::context[:parent-context-of-getting-started: {context}] - -:_mod-docs-content-type: ASSEMBLY - -ifndef::context[] -[id="getting-started"] -endif::[] -ifdef::context[] -[id="getting-started_{context}"] -endif::[] -= Getting started with {mta-dl-plugin} - -:context: getting-started - -[role="_abstract"] -The Getting started section contains information to walk you through the prerequisites, persistent volume requirements, installation, and workflows that help you to decide how you want to use the {mta-dl-full}. - -[NOTE] -==== -To get support for features in {mta-dl-plugin}, you require a Red Hat Advanced Developer Suite (RHADS) subscription. -==== - -include::con_prerequisites.adoc[leveloffset=+1] - -include::con_persistent-volumes.adoc[leveloffset=+1] - -include::con_installation.adoc[leveloffset=+1] - -include::con_developer-lightspeed-pathways.adoc[leveloffset=+1] - -include::proc_tackle-llm-secret.adoc[leveloffset=+1] - -include::proc_tackle-enable-llm-proxy.adoc[leveloffset=+1] - -include::ref_example-code-suggestion.adoc[leveloffset=+1] - - -ifdef::parent-context-of-getting-started[:context: {parent-context-of-getting-started}] -ifndef::parent-context-of-getting-started[:!context:] - -:!getting-started: \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/assembly_solution-server-configurations.adoc b/docs/topics/developer-lightspeed/assembly_solution-server-configurations.adoc deleted file mode 100644 index fbec58ad..00000000 --- a/docs/topics/developer-lightspeed/assembly_solution-server-configurations.adoc +++ /dev/null @@ -1,53 +0,0 @@ -:_newdoc-version: 2.18.3 -:_template-generated: 2025-03-17 - -ifdef::context[:parent-context-of-solution-server-configurations: {context}] - -:_mod-docs-content-type: ASSEMBLY - -ifndef::context[] -[id="solution-server"] -endif::[] -ifdef::context[] -[id="solution-server_{context}"] -endif::[] -= What is the Solution Server -:context: solution-server - -[role=_abstract] -Solution Server is a component that allows {mta-dl-plugin} to build a collective memory of source code changes from all analysis performed in an organization. When you request code fix for issues in the Visual Studio (VS) Code, the Solution Server augments previous patterns of how source code changed to resolve issues (also called solved examples) that were similar to those in the current file, and suggests a resolution that has a higher confidence level derived from previous solutions. After you accept a suggested code fix, the Solution Server works with the large language model (LLM) to improve the hints about the issue that becomes part of the context. An improved context enables the LLM to generate more reliable code fix suggestions in future cases. - -The Solution Server delivers two primary benefits to users: - -* *Contextual Hints*: It surfaces examples of past migration solutions — including successful user modifications and accepted fixes — offering actionable hints for difficult or previously unsolved migration problems. -* *Migration Success Metrics*: It exposes detailed success metrics for each migration rule, derived from real-world usage data. These metrics can be used by IDEs or automation tools to present users with a “confidence level” or likelihood of {mta-dl-plugin} successfully migrating a given code segment. - -Solution Server is an optional component in {mta-dl-plugin}. You must complete the following configurations before you can place a code resolution request. - -:FeatureName: Solution Server -[IMPORTANT] -==== -[subs="attributes+"] -{FeatureName} is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. - -For more information about the support scope of Red Hat Technology Preview features, see link:https://access.redhat.com/support/offerings/techpreview/[Technology Preview Features Support Scope]. -==== -:!FeatureName: - -.Configurable large language models and providers in the Tackle custom resource -|=== -| LLM Provider (Tackle CR value) | Large language model examples for Tackle CR configuration - -|{ocp-name} AI platform| Models deployed in an OpenShift AI cluster that can be accessed by using Open AI-compatible API -| Open AI (`openai`) | `gpt-4`, `gpt-4o`, `gpt-4o-mini`, `gpt-3.5-turbo` -| Azure OpenAI (`azure_openai`) | `gpt-4`, `gpt-35-turbo` -| Amazon Bedrock (`bedrock`) | `anthropic.claude-3-5-sonnet-20241022-v2:0`, `meta.llama3-1-70b-instruct-v1:0` -| Google Gemini (`google`) | `gemini-2.0-flash-exp`, `gemini-1.5-pro` -| Ollama (`ollama`) | `llama3.1`, `codellama`, `mistral` - -|=== - -ifdef::parent-context-of-solution-server[:context: {parent-context-of-solution-server}] -ifndef::parent-context-of-solution-server[:!context:] - -:!solution-server: \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/con_agent-ai.adoc b/docs/topics/developer-lightspeed/con_agent-ai.adoc index 51d41ee1..1ec172a1 100644 --- a/docs/topics/developer-lightspeed/con_agent-ai.adoc +++ b/docs/topics/developer-lightspeed/con_agent-ai.adoc @@ -12,13 +12,13 @@ You can enable the Agent AI or the Solution Server mode to request AI-assisted code resolutions. In the agentic AI mode, {mta-dl-plugin} streams an automated analysis of the code in a loop and makes changes in the code. In the initial run, the AI agent: * Plans the context to define the issues. -* Chooses a suitable sub agent for the analysis task. {mta-dl-plugin} works with the LLM to generate fix suggestions. The LLM displays the reasoning transcript and files to be changed. +* Chooses a suitable sub agent for the analysis task. {mta-dl-plugin} works with the LLM to generate fix suggestions. The LLM displays the reasoning transcript and files to change. * Applies the changes to the code once you approve the updates. -If you accept that the agentic AI must continue to make changes, it compiles the code and runs a partial analysis. In this iteration, the agentic AI attempts to fix diagnostic issues (if any) generated by tools that you installed in the Visual Studio Code IDE. You can review the changes and accept the agentic AI's suggestion to address these diagnostic issues. +If you accept that the agentic AI must continue to make changes, it compiles the code and runs a partial analysis. In this iteration, the agentic AI attempts to fix diagnostic issues (if any) generated by tools that you installed in the Visual Studio Code Integrated Development Environment (IDE). You can review the changes and accept the agentic AI's suggestion to address these diagnostic issues. After each iteration of applying changes to the code, the agentic AI asks if you want the agent to continue fixing more issues. When you accept, it runs another iteration of automated analysis until it has resolved all issues or it has made a maximum of two attempts to fix an issue. -Agentic AI generates a new preview in each iteration when it updates the code with the suggested resolutions. The time taken by the agentic AI to complete all iterations depends on the number of new diagnostic issues that are detected in the code. +Agentic AI generates a new preview in each iteration when it updates the code with the suggested resolutions. The time that the agentic AI takes to complete all iterations depends on the number of new diagnostic issues that it detects in the code. :!agent-ai: diff --git a/docs/topics/developer-lightspeed/con_developer-lightspeed-logs.adoc b/docs/topics/developer-lightspeed/con_developer-lightspeed-logs.adoc index 57e269af..c8381da8 100644 --- a/docs/topics/developer-lightspeed/con_developer-lightspeed-logs.adoc +++ b/docs/topics/developer-lightspeed/con_developer-lightspeed-logs.adoc @@ -7,21 +7,21 @@ = Debugging {mta-dl-plugin} [role="_abstract"] -{mta-dl-full} generates logs to debug issues specific to the extension host and the {ProductShortName} analysis and RPC server. You can also configure the log level for the {mta-dl-plugin} in the extension settings. The default log level is *debug*. +{mta-dl-full} generates logs to debug issues specific to the extension host and the {ProductShortName} analysis and Remote Procedure Call (RPC) server. You can also configure the log level for the {mta-dl-plugin} in the extension settings. The default log level is *debug*. -Extension logs are stored as `extension.log` with automatic rotation. The maximum size of the log file is 10 MB and three files are retained. Analyzer RPC logs are stored as `analyzer.log` without rotation. +{mta-dl-plugin} stores extension logs as `extension.log` with automatic rotation. The maximum size of the log file is 10 MB and {mta-dl-plugin} retains three files. {mta-dl-plugin} stores analyzer RPC logs as `analyzer.log` without rotation. [id="dev-lightspeed-archive-logs_{context}"] == Archiving the logs -To archive the logs as a zip file, type `{ProductShortName}: Generate Debug Archive` in the VS Code Command Palette and select the information type that must be archived as a log file. +To archive the logs as a zip file, type `{ProductShortName}: Generate Debug Archive` in the Visual Studio Code Command Palette and select the information type to archive as a log file. The archive command allows capturing all relevant log files in a zip archive at the specified location in your project. By default, you can access the archived logs in the .vscode directory of your project. The archival feature helps you to save the following information: -* Large language model (LLM) provider configuration: Fields from the provider settings that can be included in the archive. All fields are redacted for security reasons by default. Ensure that you do not expose any secrets. +* Large language model (LLM) provider configuration: Fields from the provider settings that you can include in the archive. {mta-dl-plugin} redacts all fields for security reasons by default. Ensure that you do not expose any secrets. * LLM model arguments * LLM traces: If you enabled tracing LLM interactions, you can choose to include LLM traces in the logs. @@ -31,8 +31,8 @@ The archival feature helps you to save the following information: You can access the logs in the following ways: -* *Log file*: Type `Developer: Open Extension Logs Folder` and open the `redhat.mta-vscode-extension` directory that contains the extension log and the analyzer log. +* *Log file*: Type `Developer: Open Extension Logs Folder` and open the `redhat.mta-vscode-extension` directory that has the extension log and the analyzer log. * *Output panel*: Select `{mta-dl-plugin}` from the drop-down menu. -* *Webview logs*: You can also inspect webview content by using the webview logs. To access the webview logs, type `Open Webview Developer Tools` in the VS Code Command Palette. \ No newline at end of file +* *Webview logs*: You can also inspect webview content by using the webview logs. To access the webview logs, type `Open Webview Developer Tools` in the Visual Studio Code Command Palette. \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/con_developer-lightspeed-pathways.adoc b/docs/topics/developer-lightspeed/con_developer-lightspeed-pathways.adoc index a7fb02f4..fb09bb32 100644 --- a/docs/topics/developer-lightspeed/con_developer-lightspeed-pathways.adoc +++ b/docs/topics/developer-lightspeed/con_developer-lightspeed-pathways.adoc @@ -7,7 +7,8 @@ = {mta-dl-plugin} workflows [role="_abstract"] -You can opt to use {mta-dl-full} features to request a code fix suggestion after running a static code analysis of an application. +You can configure the {mta-dl-plugin} extension to use centralized configuration and the large language model (LLM) through an LLM proxy. +Alternatively, you can configure the extension to use the LLM provider settings in your Visual Studio Code environment for code resolution suggestions. [NOTE] ==== @@ -26,41 +27,61 @@ You can complete one of the following workflows: As an Administrator, you must: -* Create a xref:tackle-llm-secret_getting-started[secret] for your LLM key in the Red Hat {ocp-name} cluster. +* Create a tackle secret for your LLM key in the Red Hat {ocp-name} cluster. -* In the xref:tackle-enable-llm-proxy_getting-started[Tackle custom resource (CR)], configure the LLM provider and the LLM model. +* Configure the Tackle custom resource (CR) to enable the LLM provider and the LLM model in the Tackle custom resource (CR). As a Migrator, you can complete the following workflow to use the Agent AI mode for code resolutions: -* Enable the generative AI in the xref:configuring-developer-lightspeed-ide-settings_configuring-dev-lightspeed-ide[{ProductShortName} extension settings] +* Enable the generative AI in the {ProductShortName} extension settings. -* Configure a xref:configuring-developer-lightspeed-profile-settings_configuring-dev-lightspeed-ide[profile] for the analysis. +* Configure a profile for the analysis. -* xref:llm-provider-settings_configuring-llm[Activate the LLM provider] in the `provider-settings.yaml` file. +* Activate the LLM provider in the `provider-settings.yaml` file. -* Enable the xref:running-agent-analysis_run-dev-lightspeed-analysis[Agent AI and run an analysis] to request code fix suggestion by using the Agent AI mode. +* Enable the Agent AI and run an analysis to request code fix suggestion by using the Agent AI mode. [id="llm-proxy-workflow_{context}"] == Workflow to use the LLM through the proxy service -You can allow client endpoints, for example, the MTA Visual Studio Code extension, to use the proxy service to access the large language models (LLMs). The client uses Keycloak credentials to authenticate to the MTA Hub. To authenticate to the LLM, the client sends a JSON Web Token (JWT) issued by Keycloak to the proxy service. The proxy service validates the client's JWT against the Hub's Keycloak instance. +You can allow client endpoints, for example, the {ProductShortName} Visual Studio Code extension, to use the proxy service to access the large language models (LLMs). The client uses Keycloak credentials to authenticate to the {ProductShortName} Hub. To authenticate to the LLM, the client sends a JSON Web Token (JWT) that Keycloak issues to the proxy service. The proxy service validates the client's JWT against the Hub's Keycloak instance. -The proxy service completes a separate authentication process to access the LLM through an Administrator-controlled endpoint. The proxy service authenticates to the LLM by using the cluster secret that contains the LLM API key configured by the Administrator. Thus, the proxy service allows Administrators to create, manage, and rotate LLM API keys without the need to share the LLM key with multiple client endpoints. +The proxy service completes a separate authentication process to access the LLM through an Administrator-controlled endpoint. The proxy service authenticates to the LLM by using the cluster secret that has the LLM API key that the Administrator configured. Thus, the proxy service allows Administrators to create, manage, and rotate LLM API keys without the need to share the LLM key with multiple client endpoints. -After you enable the LLM proxy, you can use either the Solution Server or Agent AI to generate code resolution requests in the IDE extension. To use the Solution Server, the Administrator must deploy it in the {ocp-name} cluster with the proxy service. You cannot use the Solution Server without the proxy service. +After you enable the LLM proxy, you can use either the Solution Server or Agent AI to generate code resolution requests in the Integrated Development Environment (IDE) extension. To use the Solution Server, the Administrator must deploy it in the {ocp-name} cluster with the proxy service. You cannot use the Solution Server without the proxy service. As an Administrator, you must complete the following workflow to enable the LLM proxy in the {ocp-name} cluster: -* Create a xref:tackle-llm-secret_getting-started[secret] for your LLM key in the Red Hat {ocp-name} cluster. +* Create a tackle secret cluster. -* In the xref:tackle-enable-llm-proxy_getting-started[Tackle custom resource (CR)], enable the LLM proxy service, enable the Solution Server if you want Migrators to use the Solution Server mode, and configure the LLM provider and the LLM model. +* Configure the Tackle custom resource (CR) to enable the LLM proxy service, enable the Solution Server if you want Migrators to use the Solution Server mode, and configure the LLM provider and the LLM model. As a Migrator, you can: -* Enable the generative AI in the xref:configuring-developer-lightspeed-ide-settings_configuring-dev-lightspeed-ide[{ProductShortName} extension settings]. +* Enable the generative AI in the {ProductShortName} extension settings. -* If you want to use the Agent AI mode for code resolutions, enable the xref:running-agent-analysis_run-dev-lightspeed-analysis[Agent AI and run an analysis]. +* If you want to use the Agent AI mode for code resolutions, enable the Agent AI and run an analysis. * To use the Solution Server mode: -.. Connect to the {ProductShortName} Hub and run an analysis by using a profile downloaded from the Hub. See link:{mta-URL}/configuring_and_using_the_visual_studio_code_extension_for_mta/index#analyzing-application-profiles_vsc-extension-guide[Running an application analysis by using a profile]. -.. Apply xref:apply-rag-resolution_run-dev-lightspeed-analysis[code resolutions suggested by the Solution Server]. \ No newline at end of file +.. Connect to the {ProductShortName} Hub and run an analysis by using a profile downloaded from the Hub. See Running an application analysis by using a profile. +.. Apply code resolutions that the Solution Server suggests. + +.Additional resources + +* xref:tackle-llm-secret_getting-started[Create a tackle secret in the cluster] + +* xref:tackle-enable-llm-proxy_getting-started[Configure the Tackle custom resource (CR)] + +* xref:configuring-developer-lightspeed-ide-settings_configuring-dev-lightspeed-ide[Enable generative AI in the {ProductShortName} extension settings] + +* xref:configuring-developer-lightspeed-profile-settings_configuring-dev-lightspeed-ide[Configure a profile] + +* xref:llm-provider-settings_configuring-llm[Activate the LLM provider] + +* xref:running-agent-analysis_run-dev-lightspeed-analysis[Enable Agent AI and run an analysis] + +* xref:configuring-developer-lightspeed-ide-settings_configuring-dev-lightspeed-ide[{ProductShortName} extension settings] + +* link:{mta-URL}/configuring_and_using_the_visual_studio_code_extension_for_mta/index#analyzing-application-profiles_vsc-extension-guide[Running an application analysis by using a profile] + +* xref:apply-rag-resolution_run-dev-lightspeed-analysis[Code resolutions that the Solution Server suggests] \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/con_dl-context.adoc b/docs/topics/developer-lightspeed/con_dl-context.adoc index 742f9125..c542aa20 100644 --- a/docs/topics/developer-lightspeed/con_dl-context.adoc +++ b/docs/topics/developer-lightspeed/con_dl-context.adoc @@ -12,17 +12,17 @@ The context is a combination of the source code, the issue description, and solved examples: -* Description of issues detected by {ProductShortName} when you run a static code analysis for a given set of target technologies. +* Description of issues that {ProductShortName} detects when you run a static code analysis for a given set of target technologies. * (Optional) The default and custom rules may contain additional information that you include which can help {mta-dl-plugin} to define the context. + -* Solved examples constitute code changes from other migrations and a pattern of resolution for an issue that can be used in future. A solved example is created when a Migrator accepts a resolution in a previous analysis that results in updated code or an unfamiliar issue in a legacy application that the Migrator manually fixed. Solved examples are stored in the Solution Server. +* Solved examples constitute code changes from other migrations and a pattern of resolution for an issue to use in future. {mta-dl-plugin} creates a solved example when a Migrator accepts a resolution in an earlier analysis that results in updated code or an unfamiliar issue in a legacy application that the Migrator manually fixed. The Solution Server stores solved examples. + -More instances of solved examples for an issue enhance the context and improve the success metrics of rules that trigger the issue. Higher the success metrics of an issue, greater the confidence level associated with the accepted resolutions for that issue in previous analyses. +More instances of solved examples for an issue enhance the context and improve the success metrics of rules that trigger the issue. Higher the success metrics of an issue, greater the confidence level associated with the accepted resolutions for that issue in earlier analyses. -* (Optional) If you enable the Solution Server, it extracts a pattern of resolution, called the migration hint, that can be used by the LLM to generate a more accurate fix suggestion in a future analysis. +* (Optional) If you enable the Solution Server, it extracts a pattern of resolution, called the migration hint, that the LLM can use to generate a more accurate fix suggestion in a future analysis. + -The improvement in the quality of migration hints results in more accurate code resolutions. Accurate code resolutions from the LLM result in the user accepting an update to the code. The updated code is stored in the Solution Server to generate a better migration hint in future. +The improvement in the quality of migration hints results in more accurate code resolutions. Accurate code resolutions from the LLM result in the user accepting an update to the code. The Solution Server stores the updated code to generate a better migration hint in future. + This cyclical improvement of resolution pattern from the Solution Server and improved migration hints lead to more reliable code changes as you migrate applications in different migration waves. diff --git a/docs/topics/developer-lightspeed/con_installation.adoc b/docs/topics/developer-lightspeed/con_installation.adoc index 99390b64..ab28113d 100644 --- a/docs/topics/developer-lightspeed/con_installation.adoc +++ b/docs/topics/developer-lightspeed/con_installation.adoc @@ -7,6 +7,9 @@ = Installation [role="_abstract"] -You can install the {ProductFullName} 8.0.0 Visual Studio (VS) Code plug-in from the link:https://marketplace.visualstudio.com/search?term=migration%20toolkit&target=VSCode&category=All%20categories&sortBy=Relevance[VS Code marketplace]. +You can install the {ProductFullName} 8.0.0 Visual Studio Code plugin from the Visual Studio Code marketplace. -You can use the {ProductShortName} VS Code plug-in to perform analysis and optionally enable {mta-dl-full} to use generative AI capabilities. You can fix code issues before migrating the application to target technologies by using the generative AI capabilities. \ No newline at end of file +You can use the {ProductShortName} Visual Studio Code plugin to perform analysis and optionally enable {mta-dl-full} to use generative AI capabilities. You can fix code issues before migrating the application to target technologies by using the generative AI capabilities. + +.Additional resources +* link:https://marketplace.visualstudio.com/search?term=migration%20toolkit&target=VSCode&category=All%20categories&sortBy=Relevance[Visual Studio Code marketplace] \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/con_intro-to-developer-lightspeed.adoc b/docs/topics/developer-lightspeed/con_intro-to-developer-lightspeed.adoc index 4a4597b8..3e674189 100644 --- a/docs/topics/developer-lightspeed/con_intro-to-developer-lightspeed.adoc +++ b/docs/topics/developer-lightspeed/con_intro-to-developer-lightspeed.adoc @@ -9,37 +9,36 @@ :context: intro-to-the-developer-lightspeed [role="_abstract"] -Starting from 8.0.0, {ProductFullName} integrates with large language models (LLM) through the {mta-dl-full} component in the Visual Studio Code extension. You can use {mta-dl-plugin} to apply LLM-driven code changes to resolve issues found through static code analysis of Java applications. +Starting from 8.0.0, {ProductFullName} integrates with large language models (LLM) through the {mta-dl-full} plugin in the Visual Studio Code extension. You can use {mta-dl-plugin} to apply LLM-assisted code changes to resolve issues that static code analysis identifies in Java applications. [id="use-case-ai-code-fix_{context}"] == Use case for AI-driven code fixes {ProductFirstRef} performs the static code analysis for a specified target technology to which you want to migrate your applications. Red Hat provides 2400+ analysis rules in {ProductShortName} for various Java technologies and you can extend the ruleset for custom frameworks or new technologies by creating custom rules. -The static code analysis describes the issues in your code that must be resolved. As you perform analysis for a large portfolio of applications, the issue description and the rule definition that may contain additional information form a large corpus of data that contains repetitive patterns of problem definitions and solutions. +The static code analysis describes the issues in your code that you must resolve. As you perform analysis for a large portfolio of applications, the issue description and the rule definition that may contain additional information form a large corpus of data that has repetitive patterns of problem definitions and solutions. -Migrators do duplicate work by resolving issues that are repeated across applications in different migration waves. +Migrators do duplicate work by resolving issues that repeat across applications in different migration waves. [id="how-developerlightspped-works_{context}"] == Red{nbsp}Hat Developer Lightspeed for {ProductShortName} overview -{mta-dl-plugin} works by collecting and storing the changes in the code for a large collection of applications, finding context to generate prompts for the LLM of your choice, and by generating code resolutions produced by the LLM to address specific issues. +{mta-dl-plugin} works by collecting and storing the changes in the code for a large collection of applications, finding context to generate prompts for the LLM of your choice, and by generating code resolutions that the LLM produces to address specific issues. -{mta-dl-plugin} augments the manual changes made to code throughout your organization in different migration waves and creates a context for a large language model (LLM). The LLM suggests code resolutions based on the issue description, context, and previous examples of code changes to resolve issues. +{mta-dl-plugin} augments the manual changes that you make to code throughout your organization in different migration waves and creates a context for a large language model (LLM). The LLM suggests code resolutions based on the issue description, context, and earlier examples of code changes to resolve issues. -{mta-dl-plugin} uses Retrieval Augmented Generation for context-based resolutions of issues in code. By using RAG, {mta-dl-plugin} improves the context shared with the LLM to generate more accurate suggestions to fix the issue in the code. The context allows the LLM to "reason" and generate suggestions for issues detected in the code. This mechanism helps to overcome the limited context size in LLMs that prevents them from analyzing the entire source code of an application. +{mta-dl-plugin} uses Retrieval Augmented Generation (RAG) for context-based resolutions of issues in code. By using RAG, {mta-dl-plugin} improves the context that it shares with the LLM to generate more accurate suggestions to fix the issue in the code. The context allows the LLM to "reason" and generate suggestions for issues that it detects in the code. This mechanism helps to overcome the limited context size in LLMs that prevents them from analyzing the entire source code of an application. -//You can consider using the demo mode for running {mta-dl-plugin} when you need to perform analysis but have a limited network connection for {mta-dl-plugin} to sync with the LLM. The demo mode stores the input data as a hash and past LLM calls in a cache. The cache is stored in a chosen location in the your file system for later use. The hash of the inputs is used to determine which LLM call must be used in the demo mode. After you enable the demo mode and configure the path to your cached LLM calls in the {mta-dl-plugin} settings, you can rerun an analysis for the same set of files using the responses to a previous LLM call. - -:FeatureName: Developer Lightspeed for MTA +:FeatureName: Developer Lightspeed for {ProductShortName} [IMPORTANT] ==== [subs="attributes+"] {FeatureName} is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. - -For more information about the support scope of Red Hat Technology Preview features, see link:https://access.redhat.com/support/offerings/techpreview/[Technology Preview Features Support Scope]. ==== :!FeatureName: +.Additional resources +* link:https://access.redhat.com/support/offerings/techpreview/[Technology Preview Features Support Scope] + :!intro-to-the-developer-lightspeed: diff --git a/docs/topics/developer-lightspeed/con_llm-service-openshift-ai.adoc b/docs/topics/developer-lightspeed/con_llm-service-openshift-ai.adoc index 6eb94c7d..0238b3e9 100644 --- a/docs/topics/developer-lightspeed/con_llm-service-openshift-ai.adoc +++ b/docs/topics/developer-lightspeed/con_llm-service-openshift-ai.adoc @@ -9,7 +9,7 @@ [role="_abstract"] The code suggestions from {mta-dl-full} differ based on the large language model (LLM) that you use. Therefore, you may want to use an LLM that caters to your specific requirements. -{mta-dl-plugin} integrates with LLMs that are deployed as a scalable service on {ocp-name} AI clusters. These deployments provide you with granular control over resources such as compute, cluster nodes, and auto-scaling Graphical Processing Units (GPUs) while enabling you to leverage LLMs to resolve code issues at a large scale. +{mta-dl-plugin} integrates with LLMs that you deployed as a scalable service on {ocp-name} AI clusters. These deployments give you granular control over resources such as compute, cluster nodes, and auto-scaling Graphical Processing Units (GPUs) while enabling you to use LLMs to resolve code issues at a large scale. An example workflow for configuring an LLM service on {ocp-name} AI broadly requires the following configurations: @@ -30,4 +30,5 @@ An example workflow for configuring an LLM service on {ocp-name} AI broadly requ ** Configure an OpenAI API key ** Update the OpenAI API key and the base URL in `provider-settings.yaml`. -See xref:llm-provider-settings_{context}[Configuring LLM provider settings] to configure the base URL and the LLM API key in the {mta-dl-plugin} VS Code extension. \ No newline at end of file +.Additional resources +* xref:llm-provider-settings_{context}[Configuring LLM provider settings] \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/con_persistent-volumes.adoc b/docs/topics/developer-lightspeed/con_persistent-volumes.adoc index b2320018..b7a5126b 100644 --- a/docs/topics/developer-lightspeed/con_persistent-volumes.adoc +++ b/docs/topics/developer-lightspeed/con_persistent-volumes.adoc @@ -7,6 +7,10 @@ = Persistent volume requirements [role="_abstract"] -The Solution Server component requires a backend database to store code changes from previous analyses. +The Solution Server component requires a backend database to store code changes from earlier analyses. -If you plan to enable Solution Server, you must create a `5Gi` `RWO` persistent volume used by the {mta-dl-plugin} database. See link:{mta-URL}/installing_the_migration_toolkit_for_applications/index#persistent-volume-requirements_installing-mta-ui[Persistent volume requirements] for more information. +If you plan to enable Solution Server, you must create a `5Gi` ReadWriteOnce (`RWO`) persistent volume for the {mta-dl-plugin} database. + +[id="_additional-resources"] +.Additional resources +* link:{mta-URL}/installing_the_migration_toolkit_for_applications/index#persistent-volume-requirements_installing-mta-ui[Persistent volume requirements] diff --git a/docs/topics/developer-lightspeed/con_prerequisites.adoc b/docs/topics/developer-lightspeed/con_prerequisites.adoc index 89f601f8..d70c049d 100644 --- a/docs/topics/developer-lightspeed/con_prerequisites.adoc +++ b/docs/topics/developer-lightspeed/con_prerequisites.adoc @@ -7,7 +7,7 @@ = Prerequisites [role="_abstract"] -This section lists the prerequisites required to successfully use the generative AI features in the {mta-dl-plugin} Visual Studio (VS) Code extension. +You can use the prerequisites required to successfully use the generative AI features in the {mta-dl-plugin} Visual Studio Code extension. Before you install {mta-dl-plugin}, you must: @@ -22,18 +22,18 @@ Before you install {mta-dl-plugin}, you must: * Install the {ProductShortName} Operator 8.0.0 + -The {ProductShortName} Operator is mandatory if you plan to enable the Solution Server that works with the large language model (LLM) for generating code changes. It enables you to log in to the `openshift-mta` project where you must enable the Solution Server in the Tackle custom resources (CR). +The {ProductShortName} Operator is mandatory if you plan to enable the Solution Server that works with the large language model (LLM) for generating code changes. Use the Operator to log in to the `openshift-mta` project where you must enable the Solution Server in the Tackle custom resources (CR). * Create an API key for an LLM. + -You must enter the provider value and model name in Tackle CR to enable generative AI configuration in the {ProductShortName} VS Code plugin. +You must enter the provider value and model name in Tackle CR to enable generative AI configuration in the {ProductShortName} Visual Studio Code plugin. + .Configurable large language models and providers |=== | LLM Provider (Tackle CR value) | Large language model examples for Tackle CR configuration -| {ocp-name} AI platform| Models deployed in an {ocp-name} AI cluster that can be accessed by using Open AI-compatible API. +| {ocp-name} AI platform| Models that you deploy in an {ocp-name} AI cluster and access by using Open AI-compatible API. | Open AI (`openai`) | `gpt-4`, `gpt-4o`, `gpt-4o-mini`, `gpt-3.5-turbo` | Azure OpenAI (`azure_openai`) | `gpt-4`, `gpt-35-turbo` | Amazon Bedrock (`bedrock`) | `anthropic.claude-3-5-sonnet-20241022-v2:0`, `meta.llama3-1-70b-instruct-v1:0` @@ -44,5 +44,5 @@ You must enter the provider value and model name in Tackle CR to enable generati [NOTE] ==== -The availability of public LLM models is maintained by the respective LLM provider. +The LLM provider maintains the availability of public LLM models. ==== \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/con_solution_server.adoc b/docs/topics/developer-lightspeed/con_solution_server.adoc index 37f9760f..1b7c592f 100644 --- a/docs/topics/developer-lightspeed/con_solution_server.adoc +++ b/docs/topics/developer-lightspeed/con_solution_server.adoc @@ -9,14 +9,14 @@ :context: solution-server [role=_abstract] -Solution Server is a component that allows {mta-dl-plugin} to build a collective memory of source code changes from all analyses performed in an organization. This helps you to use the recurring patterns of solutions for issues that repeat in many applications. You can opt to use the Solution Server to request AI-assisted code resolutions. +Solution Server is a component that allows {mta-dl-plugin} to build a collective memory of source code changes from all analyses that an organization performs. This helps you to use the recurring patterns of solutions for issues that repeat in many applications. You can opt to use the Solution Server to request AI-assisted code resolutions. -The Solution Server augments previous patterns of how source code changed to resolve issues (also called solved examples) that were similar to those in the current file, and suggests a resolution that has a higher confidence level derived from previous solutions. After you accept a suggested code fix, the Solution Server works with the large language model (LLM) to improve the hints about the issue that becomes part of the context. An improved context enables the LLM to generate more reliable code fix suggestions in future cases. +The Solution Server augments earlier patterns of how source code changed to resolve issues (also called solved examples) that were similar to those in the current file, and suggests a resolution that has a higher confidence level derived from earlier solutions. After you accept a suggested code fix, the Solution Server works with the large language model (LLM) to improve the hints about the issue that becomes part of the context. An improved context enables the LLM to generate more reliable code fix suggestions in future cases. The Solution Server delivers two primary benefits to users: -* *Contextual Hints*: It surfaces examples of past migration solutions — including successful user modifications and accepted fixes — offering actionable hints for difficult or previously unsolved migration problems. -* *Migration Success Metrics*: It exposes detailed success metrics for each migration rule, derived from real-world usage data. These metrics can be used by IDEs or automation tools to present users with a “confidence level” or likelihood of {mta-dl-plugin} successfully migrating a given code segment. +* *Contextual Hints*: It surfaces examples of past migration solutions, including successful user modifications and accepted fixes, offering actionable hints for difficult or previously unsolved migration problems. +* *Migration Success Metrics*: It exposes detailed success metrics for each migration rule, derived from real-world usage data. Integrated Development Environments (IDEs) or automation tools can use these metrics to present users with a “confidence level” or likelihood of {mta-dl-plugin} successfully migrating a given code segment. When you use the Solution Server, you can view a diff of the updated portions of the code and the original source code to do a manual review. In a manual review of the suggested AI resolutions, you can accept, reject, or edit the suggested code changes. @@ -25,8 +25,6 @@ When you use the Solution Server, you can view a diff of the updated portions of ==== [subs="attributes+"] {FeatureName} is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. - -For more information about the support scope of Red Hat Technology Preview features, see link:https://access.redhat.com/support/offerings/techpreview/[Technology Preview Features Support Scope]. ==== :!FeatureName: @@ -34,7 +32,7 @@ For more information about the support scope of Red Hat Technology Preview featu |=== | LLM Provider (Tackle CR value) | Large language model examples for Tackle CR configuration -|{ocp-name} AI platform| Models deployed in an OpenShift AI cluster that can be accessed by using Open AI-compatible API +|{ocp-name} AI platform| Models that you deploy in an OpenShift AI cluster and access by using Open AI-compatible API | Open AI (`openai`) | `gpt-4`, `gpt-4o`, `gpt-4o-mini`, `gpt-3.5-turbo` | Azure OpenAI (`azure_openai`) | `gpt-4`, `gpt-35-turbo` | Amazon Bedrock (`bedrock`) | `anthropic.claude-3-5-sonnet-20241022-v2:0`, `meta.llama3-1-70b-instruct-v1:0` @@ -43,4 +41,7 @@ For more information about the support scope of Red Hat Technology Preview featu |=== +.Additional resources +* link:https://access.redhat.com/support/offerings/techpreview/[Technology Preview Features Support Scope] + :!solution-server: diff --git a/docs/topics/developer-lightspeed/proc_apply-rag-resolution.adoc b/docs/topics/developer-lightspeed/proc_apply-rag-resolution.adoc index 7f5734cd..0565cc52 100644 --- a/docs/topics/developer-lightspeed/proc_apply-rag-resolution.adoc +++ b/docs/topics/developer-lightspeed/proc_apply-rag-resolution.adoc @@ -6,13 +6,13 @@ = Applying resolutions generated by the solution server [role="_abstract"] -When you request code resolutions by enabling the Solution Server, an issue displays the success metric when the metric becomes available. A success metric indicates the confidence level in applying the fix suggestion from the LLM based on how many times the update was applied in past analysis. +When you request code resolutions by enabling the Solution Server, an issue displays the success metric when the metric becomes available. A success metric indicates the confidence level in applying the fix suggestion from the LLM based on how many times you applied the update in past analyses. You can review the code updates and edit the suggested code resolutions before accepting the suggestions. .Prerequisites -* You opened a Java project in your VS Code workspace. +* You opened a Java project in your Visual Studio Code workspace. * You configured a profile on the *{ProductShortName} Analysis View* page. * You ran an analysis after enabling the Solution Server. @@ -20,11 +20,11 @@ You can review the code updates and edit the suggested code resolutions before a . Review the issues from the *Analysis results* space of the *{ProductShortName} view analysis* page by the following tabs: .. *All*: lists all incidents identified in your project. -.. *Files*: lists all the files in your project for which the analysis identified issues that must be resolved. +.. *Files*: lists all the files in your project for which the analysis identified issues that you must resolve. .. *Issues*: lists all issues across different files in your project. . Use the *Category* drop down to filter issues based on how crucial the fix is for the target migration. You can filter mandatory, potential, and optional issues. -. Click *Has Success Rate* to check how many times the same issue resolution was accepted in previous analysis. -. Click the solution tool to trigger automated updates to your code. If you applied any category filter, code updates are made for all incidents, specific files, or specific issues based on the filter. +. Click *Has Success Rate* to check how many times you accepted the same issue resolution in an earlier analysis. +. Click the solution tool to trigger automated updates to your code. If you applied any category filter, {mta-dl-plugin} makes code updates for all incidents, specific files, or specific issues based on the filter. {mta-dl-plugin} generates new files with the updated code. . Review and (optionally) edit the code. . Click *Apply all* in the *Resolutions* pane to permanently apply the changes to your code. \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/proc_configuring-developer-lightspeed-ide-settings.adoc b/docs/topics/developer-lightspeed/proc_configuring-developer-lightspeed-ide-settings.adoc index 318cc1ad..da054a38 100644 --- a/docs/topics/developer-lightspeed/proc_configuring-developer-lightspeed-ide-settings.adoc +++ b/docs/topics/developer-lightspeed/proc_configuring-developer-lightspeed-ide-settings.adoc @@ -6,9 +6,9 @@ = Configuring the {mta-dl-plugin} IDE settings [role="_abstract"] -After you install the {ProductShortName} extension in Visual Studio (VS) Code, you must provide your large language model (LLM) credentials to activate {mta-dl-plugin} settings in Visual Studio (VS) Code. +Configure the Visual Studio Code Integrated Development Environment (IDE) settings to perform analyses and AI-assisted code resolutions. You can broadly categorize the extension settings into debugging and logging, {mta-dl-plugin} settings, analysis settings, and Solution Server settings. -{mta-dl-plugin} settings are applied to all AI-assisted analyses that you perform by using the {ProductShortName} extension. The extension settings can be broadly categorized into debugging and logging, {mta-dl-plugin} settings, analysis settings, and Solution Server settings. +After you install the {ProductShortName} extension in Visual Studio Code, you must enter your large language model (LLM) credentials to use {mta-dl-plugin} in the Visual Studio Code IDE. .Prerequisites @@ -20,9 +20,9 @@ In addition to the overall prerequisites, you have configured the following: . Go to the {mta-dl-plugin} settings in one of the following ways: + -.. Click `Extensions > {ProductShortName} Extension for VSCode > Settings` +.. Click `Extensions > {ProductFirstRef} Extension > Settings` + -.. Type `Ctrl + Shift + P` or `Cmd + Shift + P` on the search bar to open the Command Palette and enter `Preferences: Open Settings (UI)`. Go to `Extensions > MTA` to open the settings page. +.. Type `Ctrl+Shift+P` or `Cmd+Shift+P` on the search bar to open the Command Palette and enter `Preferences: Open Settings (UI)`. Go to `Extensions > {ProductShortName}` to open the settings page. + . Configure the settings described in the following table: + @@ -32,16 +32,16 @@ In addition to the overall prerequisites, you have configured the following: |==== |Settings |Description |Log level|Set the log level for the {ProductShortName} binary. The default log level is `debug`. The log level increases or decreases the verbosity of logs. -|Analyzer path|Specify an {ProductShortName} custom binary path. If you do not provide a path, {mta-dl-plugin} uses the default path to the binary. -|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. -|Gen AI:Enabled|This option is enabled by default. It enables you to get code fixes by using {mta-dl-plugin} with a large language model. +|Analyzer path|Specify an {ProductShortName} custom binary path. If you do not give a path, {mta-dl-plugin} uses the default path to the binary. +|Auto Accept on Save|{mta-dl-plugin} enables this option by default. When you accept the changes that the LLM suggests, {mta-dl-plugin} automatically saves the updated code in a new file. Disable this option if you want to manually save the new file after accepting the code changes. +|Gen AI:Enabled|{mta-dl-plugin} enables this option by default. You can get code fixes by using {mta-dl-plugin} with a large language model. |Gen AI: Agent mode|Enable the experimental Agentic AI flow for analysis. {mta-dl-plugin} runs an automated analysis of a file to identify issues and suggest resolutions. After you accept the solutions, {mta-dl-plugin} makes the changes in the code and re-analyzes the file. -|Gen AI: Excluded diagnostic sources|Add diagnostic sources in the `settings.json` file. The issues generated by such diagnostic sources are excluded from the automated Agentic AI analysis. +|Gen AI: Excluded diagnostic sources|Add diagnostic sources in the `settings.json` file. {mta-dl-plugin} excludes the issues that such diagnostic sources generate from the automated Agentic AI analysis. |Cache directory|Specify the path to a directory in your filesystem to store cached responses from the LLM. -|Trace directory|Configure the absolute path to the directory that contains the saved LLM interaction. -|Trace enabled|Enable to trace {ProductShortName} communication with the LLM model. Traces are stored in the trace directory that you configured. -|Demo mode|Enable to run {mta-dl-plugin} in demo mode that uses the LLM responses saved in the `cache` directory for analysis. -|Debug:Webview|Enable debug level logging for Webview message handling in VS Code. +|Trace directory|Configure the absolute path to the directory that has the saved LLM interaction. +|Trace enabled|Enable to trace {ProductShortName} communication with the LLM model. {mta-dl-plugin} stores traces in the trace directory that you configured. +|Demo mode|Enable to run {mta-dl-plugin} in demo mode that uses the LLM responses from the `cache` directory for analysis. +|Debug:Webview|Enable debug level logging for Webview message handling in Visual Studio Code. |==== diff --git a/docs/topics/developer-lightspeed/proc_configuring-developer-profile-settings.adoc b/docs/topics/developer-lightspeed/proc_configuring-developer-profile-settings.adoc index bb2a194f..0c29ff6a 100644 --- a/docs/topics/developer-lightspeed/proc_configuring-developer-profile-settings.adoc +++ b/docs/topics/developer-lightspeed/proc_configuring-developer-profile-settings.adoc @@ -6,47 +6,47 @@ = Configuring the {mta-dl-plugin} profile settings [role="_abstract"] -You can use the Visual Studio (VS) Code plugin to run an analysis to discover issues in the code. You can optionally enable {mta-dl-full} to get AI-assisted code suggestions. - -To generate code changes using {mta-dl-plugin}, 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). +To perform repeated analyses, you can create a reusable profile configuration. You can use the profile you configure in your Integrated Development Environment (IDE). .Prerequisites * You completed the Solution Server configurations in Tackle custom resource if you opt to use the Solution Server. -* You opened a Java project in your VS Code workspace. +* You opened a project in your Visual Studio Code workspace. .Procedure . Open the `{ProductShortName} View Analysis` page in either of the following ways: -+ .. Click the book icon on the `{ProductShortName}: Issues` pane of the {ProductShortName} extension. .. Type `Ctrl + Shift + P` or `Cmd + Shift + P` on the search bar to open the Command Palette and enter `{ProductShortName}:Open Analysis View`. -+ . Click the settings button on the `{ProductShortName} View Analysis` page to configure a profile for your project. -The `Get Ready to Analyze` pane lists the following 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. - +The `Get Ready to Analyze` pane lists the profile configuration options. ++ .{mta-dl-plugin} profile settings [cols="20%,80%a",options="header",] |==== |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. +|Select profile|Create a profile. 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). {mta-dl-plugin} uses this configuration to determine the rules that are applied to a project during analysis. +Specify one or more target or source technologies (for example, cloud-readiness). {mta-dl-plugin} uses this configuration to determine the rules to apply 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 technologies before running an analysis. +You must configure either target or source technologies for running an analysis. ==== |Set rules|Enable default rules and select your custom rule that you want {ProductShortName} to use for an analysis. You can use the custom rules in addition to the default rules. -|Configure generative AI|This option opens the `provider-settings.yaml` file that contains API keys and other parameters for all supported LLMs. By default, {mta-dl-plugin} is configured to use OpenAI LLM. To change the model, update the anchor `&active` to the desired block. Modify this file with the required arguments, such as the model and API key, to complete the setup. +|Configure generative AI|This option opens the `provider-settings.yaml` file that has API keys and other parameters for all supported LLMs. By default, {mta-dl-plugin} uses OpenAI LLM. To change the model, update the anchor `&active` to the desired block. Modify this file with the required arguments, such as the model and API key, to complete the setup. |==== -See xref:llm-provider-settings_configuring-llm[Configuring LLM provider settings] to complete the LLM provider configuration. + +.Verification + +After you complete the profile configuration: + +. Open *{ProductShortName} Analysis View*. +. Click *Run Analysis* to verify that your configuration works by running an analysis. + + diff --git a/docs/topics/developer-lightspeed/proc_configuring-llm-podman-desktop.adoc b/docs/topics/developer-lightspeed/proc_configuring-llm-podman-desktop.adoc index 4989e37d..014425cb 100644 --- a/docs/topics/developer-lightspeed/proc_configuring-llm-podman-desktop.adoc +++ b/docs/topics/developer-lightspeed/proc_configuring-llm-podman-desktop.adoc @@ -6,13 +6,13 @@ = Configuring the LLM in Podman Desktop [role="_abstract"] -The Podman AI lab extension enables you to use an open-source model from a curated list of models and use it locally in your system. +Use the Podman AI lab extension to select an open source model from a curated list of models and run it locally in your system. -The code fix suggestions generated by a model depends on the model's capabilities. Models deployed through the Podman AI Lab were found to be insufficient for the complexity of code changes required to fix issues discovered by {ProductShortName}. You must not use such models in a production environment. +The code fix suggestions that a model generates depend on the model's capabilities. Models from the Podman AI Lab are insufficient for the complexity of code changes needed to fix issues that {ProductShortName} discovers. You must not use such models in a production environment. .Prerequisites -* You installed link:https://podman-desktop.io/docs/installation[Podman Desktop] in your system. +* You installed Podman Desktop in your system. * You completed initial configurations in {mta-dl-plugin} required for the analysis. @@ -57,4 +57,8 @@ podman_mistral: &active [NOTE] ==== The Podman Desktop service endpoint does not need a password but the OpenAI library expects the `OPENAI_API_KEY` to be set. In this case, the value of the `OPENAI_API_KEY` variable does not matter. -==== \ No newline at end of file +==== + +.Additional resources + +* link:https://podman-desktop.io/docs/installation[Podman Desktop] \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/proc_running-agent-analysis.adoc b/docs/topics/developer-lightspeed/proc_running-agent-analysis.adoc index 00b82ffd..a3d29319 100644 --- a/docs/topics/developer-lightspeed/proc_running-agent-analysis.adoc +++ b/docs/topics/developer-lightspeed/proc_running-agent-analysis.adoc @@ -6,35 +6,32 @@ = Generating code resolutions in the agent mode [role="_abstract"] -In the agent mode, the {mta-dl-plugin} planning agent creates the context for an issue and picks a sub-agent that is most suited to resolve the issue. The sub-agent runs an automated scan to describe how the issue can be resolved and generates files with the updated resolutions in one stream. +As a Migrator, you can use the agent mode to run an automated analysis that streams the code resolutions that the agent can apply to your source code. When using the agent mode, you can reject the changes or stop the stream but you cannot edit the updated files during the stream. -You can review the updated files and approve or reject the changes to the code. The agent runs another automated analysis to detect new issues in the code that may have occurred because of the accepted changes or diagnostic issues that your tool may generate following a previous analysis. If you allow the process to continue, {mta-dl-plugin} runs the stream again and generates a new file with the latest updates. - -When using the agent mode, you can reject the changes or discontinue the stream but you cannot edit the updated files during the stream. +The agent detects new issues in the code that may have occurred because of the earlier accepted changes or diagnostic issues that your tool may generate following an earlier analysis. If you allow the process to continue, {mta-dl-plugin} runs the stream again and generates a new file with the latest updates. .Prerequisites -* You opened a Java project in your VS Code workspace. +* You opened a Java project in your Visual Studio Code workspace. * You configured an analysis profile on the *{ProductShortName} Analysis View* page. .Procedure -. Verify that agent mode is enabled in one of the following ways: +. Enable the agent mode in one of the following ways: + -.. Type `Ctrl + Shift + P` in VS Code search (Linux/Windows system) and `Cmd + Shift + P` for Mac to go to the command palette. -.. Enter `Preferences: Open User Settings (JSON)` to open the `settings.json` file. -.. Ensure that `mta-vscode-extension.genai.agentMode` is set to `true`. +.. Open the *MTA Analysis View* page. +.. Enable the *Agent Mode* on. + OR + -.. Go to *Extensions > {mta-dl-plugin} > settings* -.. Click the *Agent Mode* option to enable the server. +.. Go to *Extensions > {ProductShortName}-core > GenAI: Agent Mode* +.. Select the *Agent Mode* checkbox. + . Click the {mta-dl-plugin} extension and click *Open {ProductShortName} Analysis View*. + . Select a profile for the analysis. + -. Click *Start* to start the {ProductShortName} RPC server. +. Click *Start* to start the {ProductShortName} Remote Procedure Call (RPC) server. + . Click *Run Analysis* on the *{ProductShortName} Analysis View* page. The *Resolution Details* tab opens, where you can view the automated analysis that makes changes in applicable files. diff --git a/docs/topics/developer-lightspeed/proc_running-rag-analysis.adoc b/docs/topics/developer-lightspeed/proc_running-rag-analysis.adoc index 510290cd..ddfa3ed0 100644 --- a/docs/topics/developer-lightspeed/proc_running-rag-analysis.adoc +++ b/docs/topics/developer-lightspeed/proc_running-rag-analysis.adoc @@ -10,7 +10,7 @@ You can run a static code analysis of an application with or without enabling th .Prerequisites -* You opened a Java project in your VS Code workspace. +* You opened a Java project in your Visual Studio Code workspace. * You configured an analysis profile on the *{ProductShortName} Analysis View* page. .Procedure diff --git a/docs/topics/developer-lightspeed/proc_tackle-enable-dev-lightspeed.adoc b/docs/topics/developer-lightspeed/proc_tackle-enable-dev-lightspeed.adoc deleted file mode 100644 index 3ad42a60..00000000 --- a/docs/topics/developer-lightspeed/proc_tackle-enable-dev-lightspeed.adoc +++ /dev/null @@ -1,80 +0,0 @@ -:_newdoc-version: 2.15.0 -:_template-generated: 2024-2-21 -:_mod-docs-content-type: PROCEDURE - -[id="tackle-enable-dev-lightspeed_{context}"] -= Enabling {mta-dl-plugin} in Tackle custom resource - -[role="_abstract"] -Solution Server integrates with the {ProductShortName} Hub backend component to use the database and volumes necessary to store and retrieve the solved examples. - -To enable Solution Server and other AI configurations in the {mta-dl-full} VS Code extension, you must modify the Tackle custom resource (CR) with additional parameters. - -[NOTE] -==== -To use the Solution Server, the Administrator must deploy it in the {ocp-name} cluster with the proxy service. You cannot use the Solution Server without the proxy service. See xref:tackle-enable-llm-proxy_getting-started[Enabling LLM proxy in the Tackle custom resource] for more information. -==== - -.Prerequisites - -//the hard link must be changed to the same topic in 8.0.0 that has the `{mta-dl-plugin}-database` req. -. You deployed an additional RWO volume for the `{mta-dl-plugin}-database` if you want to use {mta-dl-plugin}. See link:{mta-URL}/installing_the_migration_toolkit_for_applications/index#persistent-volume-requirements_installing-mta-ui[Persistent volume requirements] for more information. - -. You installed the {ProductShortName} operator v8.0.0. - - -.Procedure - -. Log in to the Red Hat {ocp-name} cluster and switch to the `openshift-mta` project. -+ -. Edit the Tackle CR settings in the `tackle_hub.yml` file with the following command: -+ -[source, terminal] ----- -oc edit tackle ----- - -. Enter applicable values for `kai_llm_provider` and `kai_llm_model` variables. -+ -[source, yaml] ----- -kind: Tackle -apiVersion: tackle.konveyor.io/v1alpha1 -metadata: - name: mta - namespace: openshift-mta -spec: - kai_llm_proxy_enabled: true - kai_solution_server_enabled: true - kai_llm_provider: #For example, OpenAI. - # optional, pick a suitable model for your provider - kai_llm_model: ----- -+ - -[NOTE] -==== -For OpenAI models and LLMs deployed in the {ocp-name} AI cluster, enter `OpenAI` as the `kai_llm_provider` value. -==== - -. Apply the Tackle CR by in the `openshift-mta` project using the following command. -+ -[source, terminal] ----- - $ oc apply -f tackle_hub.yaml ----- - -.Verification - -. Enter the following command to verify the {mta-dl-plugin} resources deployed for Solution Server. -+ -[source, terminal] ----- -oc get deploy,svc -n openshift-mta | grep -E 'kai-(api|db|importer)' ----- -+ - -[NOTE] -==== -When you enable Solution Server, the Solution Server API endpoint is served through the {ProductShortName} Hub. You need not complete any further task, such as creating a route for the Solution Server API. -==== diff --git a/docs/topics/developer-lightspeed/proc_tackle-enable-llm-proxy.adoc b/docs/topics/developer-lightspeed/proc_tackle-enable-llm-proxy.adoc index 8ae66e13..a3d5a43f 100644 --- a/docs/topics/developer-lightspeed/proc_tackle-enable-llm-proxy.adoc +++ b/docs/topics/developer-lightspeed/proc_tackle-enable-llm-proxy.adoc @@ -8,7 +8,7 @@ [role="_abstract"] To use the LLM proxy service, you must enable the proxy in the Tackle custom resource (CR) and deploy it in the Red Hat {ocp-name} project where you installed the {ProductShortName} Operator. -The proxy authenticates to the LLM in the backend by using the LLM secret configured in the cluster. This helps the Administrator to create, manage, and rotate the LLM key without sharing the key with many client endpoints, for example, {ProductShortName} IDE extension, in the organization. +The proxy authenticates to the LLM in the backend by using the LLM secret that you configured in the cluster. This helps the Administrator to create, manage, and rotate the LLM key without sharing the key with many client endpoints, for example, {ProductShortName} Integrated Development Environment (IDE) extension, in the organization. [NOTE] ==== @@ -17,7 +17,7 @@ To use the Solution Server, the Administrator must enable it in the Tackle CR al .Prerequisites -* You deployed an additional `RWO` volume for the `{mta-dl-plugin}-database` if you want to use {mta-dl-plugin}. See link:{mta-URL}/installing_the_migration_toolkit_for_applications/index#persistent-volume-requirements_installing-mta-ui[Persistent volume requirements] for more information. +* You deployed an additional ReadWriteOnce (`RWO`) volume for the `{mta-dl-plugin}-database` if you want to use {mta-dl-plugin}. See Persistent volume requirements for more information. * You installed the {ProductShortName} Operator v8.1.0 or later. @@ -28,9 +28,9 @@ To use the Solution Server, the Administrator must enable it in the Tackle CR al + . Create the Tackle CR in the `tackle_hub.yaml` file: + -[source, terminal] +[subs="+quotes"] ---- -vi tackle +*vi tackle* ---- . Enable `kai_llm_proxy_enabled` in the Tackle CR: @@ -56,23 +56,27 @@ spec: . Apply the Tackle CR in the `openshift-mta` project: + -[source, terminal] +[subs="+quotes"] ---- - $ oc apply -f tackle_hub.yaml + $ *oc apply -f tackle_hub.yaml* ---- .Verification -. Enter the following command to verify the {mta-dl-plugin} resources deployed for Solution Server. +* Enter the following command to verify the {mta-dl-plugin} resources deployed for Solution Server. + -[source, terminal] +[subs="+quotes"] ---- -oc get deploy,svc -n openshift-mta | grep -E 'kai-(api|db|importer)' +$ *oc get deploy,svc -n openshift-mta | grep -E 'kai-(api|db|importer)'* ---- + [NOTE] ==== -When you enable Solution Server, the Solution Server API endpoint is served through the {ProductShortName} Hub. You need not complete any further task, such as creating a route for the Solution Server API. +When you enable Solution Server, the {ProductShortName} Hub serves the Solution Server API endpoint. You need not complete any further task, such as creating a route for the Solution Server API. ==== +[role="_additional-resources"] +.Additional resources + +* link:{mta-URL}/installing_the_migration_toolkit_for_applications/index#persistent-volume-requirements_installing-mta-ui[Persistent volume requirements] \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/proc_tackle-llm-secret.adoc b/docs/topics/developer-lightspeed/proc_tackle-llm-secret.adoc index 46d5aade..46d443f4 100644 --- a/docs/topics/developer-lightspeed/proc_tackle-llm-secret.adoc +++ b/docs/topics/developer-lightspeed/proc_tackle-llm-secret.adoc @@ -24,40 +24,40 @@ You must create a LLM API key secret in your {ocp-name} cluster to produce the r .. For Amazon Bedrock as the provider, type: + -[source, terminal] +[subs="+quotes"] ---- -oc create secret generic aws-credentials \ - --from-literal=AWS_ACCESS_KEY_ID= \ - --from-literal=AWS_SECRET_ACCESS_KEY= +*oc create secret generic aws-credentials* \ + *--from-literal=AWS_ACCESS_KEY_ID=* \ + *--from-literal=AWS_SECRET_ACCESS_KEY=* ---- + .. For Azure OpenAI as the provider, type: + -[source, terminal] +[subs="+quotes"] ---- -oc create secret generic kai-api-keys -n openshift-mta \ - --from-literal=AZURE_OPENAI_API_KEY='' +*oc create secret generic kai-api-keys -n openshift-mta* \ + *--from-literal=AZURE_OPENAI_API_KEY=''* ---- + .. For Google as the provider, type: + -[source, terminal] +[subs="+quotes"] ---- -oc create secret generic kai-api-keys -n openshift-mta \ - --from-literal=GEMINI_API_KEY='' +*oc create secret generic kai-api-keys -n openshift-mta* \ + *--from-literal=GEMINI_API_KEY=''* ---- + .. For the OpenAI-compatible providers, type: + -[source, terminal] +[subs="+quotes"] ---- -oc create secret generic kai-api-keys -n openshift-mta \ - --from-literal=OPENAI_API_BASE='https://example.openai.com/v1' \ - --from-literal=OPENAI_API_KEY='' +*oc create secret generic kai-api-keys -n openshift-mta* \ + *--from-literal=OPENAI_API_BASE='https://example.openai.com/v1'* \ + *--from-literal=OPENAI_API_KEY=''* ---- + [NOTE] @@ -69,9 +69,8 @@ You can also set the base URL as the `kai_llm_baseurl` variable in the Tackle cu . (Optional) Force a reconcile so that the {ProductShortName} operator picks up the secret immediately + -[source, terminal] +[subs="+quotes"] ---- -kubectl patch tackle tackle -n openshift-mta --type=merge -p \ -'{"metadata":{"annotations":{"konveyor.io/force-reconcile":"'"$(date +%s)"'"}}}' ----- -//Is the double tackle needed in the command? +*kubectl patch tackle tackle -n openshift-mta --type=merge -p* \ +*'{"metadata":{"annotations":{"konveyor.io/force-reconcile":"'"$(date +%s)"'"}}}'* +---- \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/ref_dl-benefits.adoc b/docs/topics/developer-lightspeed/ref_dl-benefits.adoc index c9ad89d1..ce458b68 100644 --- a/docs/topics/developer-lightspeed/ref_dl-benefits.adoc +++ b/docs/topics/developer-lightspeed/ref_dl-benefits.adoc @@ -14,8 +14,8 @@ * *Model agnostic* - {mta-dl-plugin} follows a "Bring Your Own Model" approach, allowing your organization to use a preferred LLM. * *Iterative refinement* - {mta-dl-plugin} can include an agent that iterates through the source code to run a series of automated analyses that resolves both the code base and diagnostic issues. -* *Contextual code generation* - By leveraging AI for static code analysis, {mta-dl-plugin} breaks down complex problems into more manageable ones, providing the LLM with focused context to generate meaningful results. This helps overcome the limited context size of LLMs when dealing with large codebases. +* *Contextual code generation* - {mta-dl-plugin} breaks down complex problems into more manageable ones, providing the LLM with focused context to generate meaningful results. This helps overcome the limited context size of LLMs when dealing with large codebases. * *No fine tuning* - You also do not need to fine tune your model with a suitable data set for analysis which leaves you free to use and switch LLM models to respond to your requirements. -* *Learning and Improvement* - As more parts of a codebase are migrated with {mta-dl-plugin}, it can use RAG to learn from the available data and provide better recommendations in subsequent application analysis. +* *Learning and Improvement* - As {mta-dl-plugin} migrates more parts of a codebase, it can use RAG to learn from the available data and give better recommendations in subsequent application analysis. :!dl-benefits: diff --git a/docs/topics/developer-lightspeed/ref_example-code-suggestion.adoc b/docs/topics/developer-lightspeed/ref_example-code-suggestion.adoc index 65842d39..e45957d1 100644 --- a/docs/topics/developer-lightspeed/ref_example-code-suggestion.adoc +++ b/docs/topics/developer-lightspeed/ref_example-code-suggestion.adoc @@ -6,23 +6,23 @@ = Generating code fix suggestions [role="_abstract"] -This example will walk you through generating code fixes for a Java application that must be migrated to the target technology `quarkus`. To generate resolutions for issues in the code, we use the Agentic AI mode and the `my-model` as the large language model (LLM) that you deployed in {ocp-name} AI. +Generate code fixes for a Java application you want to migrate to the target technology `quarkus`. To stream code changes that resolve issues in the code, use the Agent mode and the `my-model` as the large language model (LLM) that you deployed in {ocp-name} AI. .Procedure -. Open the `my-Java` project in Visual Studio (VS) Code. +. Open the `my-Java` project in Visual Studio Code. -. Download the {mta-dl-full} extension from the link:https://marketplace.visualstudio.com/search?term=migration%20toolkit&target=VSCode&category=All%20categories&sortBy=Relevance[VS Code marketplace]. +. Download the {mta-dl-full} extension from the Visual Studio Code marketplace. . Type `Ctrl+Shift+P` (Windows and Linux systems) or `Cmd+Shift+P` (Mac systems). -. Type `Preferences: Open Settings (UI)` in the Command Palette to open the VS Code settings and select `Extensions > {ProductShortName}`. +. Type `Preferences: Open Settings (UI)` in the Command Palette to open the Visual Studio Code settings and select `Extensions > {ProductShortName}`. . Select `Gen AI:Agent Mode`. . In the {mta-dl-plugin} extension, click `Open Analysis View`. -. Type `MTA: Manage Analysis Profile` in the Command Palette and configure the following fields: +. Type `{ProductShortName}: Manage Analysis Profile` in the Command Palette and configure the following fields: ** *Profile Name*: Type a profile name @@ -30,7 +30,7 @@ This example will walk you through generating code fixes for a Java application ** *Custom Rules*: Select custom rules if you want to include them while running the analysis. By default, {mta-dl-plugin} enables *Use Default Rules* for `quarkus`. -. Type `MTA: Open the Gen AI model provider configuration file` in the Command Palette to configure the following in the `provider-settings` file: +. Type `{ProductShortName}: Open the Gen AI model provider configuration file` in the Command Palette to configure the following in the `provider-settings` file: + [source, yaml] ---- @@ -51,20 +51,25 @@ models: You must change the `provider-setting` configuration if you plan to use a different LLM provider. ==== -. On the `{ProductShortName}: Open Analysis View` page, click *Start* to start the {ProductShortName} RPC server. +. On the `{ProductShortName}: Open Analysis View` page, click *Start* to start the {ProductShortName} Remote Procedure Call (RPC) server. . Select the profile you configured and click *Run Analysis* to scan the Java application. + {ProductShortName} identifies the issues in the code. -. Click the solutions icon (image:solutions-icon-new.png[]) in an issue to request suggestions to resolve the issue. +. Click the solutions icon (image:solutions-icon-new.png["Click solutions icon"]) in an issue to request suggestions to resolve the issue. + -{mta-dl-plugin} streams the issue description, a preview of the code changes that resolve the issue, and the file(s) in which the changes are to be made. +{mta-dl-plugin} streams the issue description, a preview of the code changes in files that resolve the issue. + You can review the code changes in the editor and accept or reject the changes. If you accept the changes, {mta-dl-plugin} creates a new file with the accepted code changes. + . Click *Continue* to allow {mta-dl-plugin} to run a follow-up analysis. + -This round of analysis detects lint issues, compilation issues, or diagnostic issues that may have occurred when you accepted the suggested code change. +This round of analysis detects lint issues, compilation issues, or diagnostic issues that can occur when you accepted the suggested code change. + -Repeat the review and accept or reject the resolutions. {mta-dl-plugin} continues to run repeated iterations of scan if you allow until all issues are resolved. \ No newline at end of file +Repeat the review and accept or reject the resolutions. {mta-dl-plugin} continues to run repeated iterations of scan if you allow until it resolves all issues. + +[role="_additional-resources"] +.Additional resources + +* link:https://marketplace.visualstudio.com/search?term=migration%20toolkit&target=VSCode&category=All%20categories&sortBy=Relevance[Visual Studio Code marketplace] \ No newline at end of file diff --git a/docs/topics/developer-lightspeed/ref_llm-provider-configurations.adoc b/docs/topics/developer-lightspeed/ref_llm-provider-configurations.adoc index 8280c6ea..3dc44e15 100644 --- a/docs/topics/developer-lightspeed/ref_llm-provider-configurations.adoc +++ b/docs/topics/developer-lightspeed/ref_llm-provider-configurations.adoc @@ -9,11 +9,11 @@ [role="_abstract"] {mta-dl-full} is large language model (LLM) agnostic and integrates with an LLM of your choice. To enable {mta-dl-plugin} to access your large language model (LLM), you must enter the LLM provider configurations in the `provider-settings.yaml` file. -The `provider-settings.yaml` file contains a list of LLM providers that are supported by default. The mandatory environment variables are different for each LLM provider. Depending on the provider that you choose, you can configure additional environment variables for a model in the `provider-settings.yaml` file. You can also enter a new provider with the required environment variables, the base URL, and the model name. +The `provider-settings.yaml` file has a list of LLM providers that {mta-dl-plugin} supports by default. The mandatory environment variables are different for each LLM provider. Depending on the provider that you choose, you can configure additional environment variables for a model in the `provider-settings.yaml` file. You can also enter a new provider with the required environment variables, the base URL, and the model name. -The provider settings file is available in the {mta-dl-plugin} Visual Studio (VS) Code extension. +You can find the provider settings file in the {mta-dl-plugin} Visual Studio Code extension. -Access the `provider-settings.yaml` from the VS Code Command Palette by typing `Open the GenAI model provider configuration file`. +Access the `provider-settings.yaml` from the Visual Studio Code Command Palette by typing `Open the GenAI model provider configuration file`. [NOTE] ==== @@ -22,7 +22,6 @@ You can select one provider from the list by using the `&active` anchor in the n For a model named "my-model" deployed in {ocp-name} AI with "example-model" as the serving name: -//check if openshift prefix is required for OpenShift AI model provider, like "openshift-example-model" or can it be just "example-model" [source, yaml] ---- models: @@ -88,7 +87,7 @@ AmazonBedrock: &active [NOTE] ==== -It is recommended to use the link:https://aws.amazon.com/cli/[AWS CLI] and verify that you have command line access to AWS services before you proceed with the `provider-settings` configurations. +You can use the AWS CLI to verify that you have command line access to AWS services before you proceed with the `provider-settings` configurations. ==== @@ -115,3 +114,7 @@ models: model: "granite-code:8b-instruct" baseUrl: "127.0.0.1:11434" # example URL ---- + +.Additional resources + +* link:https://aws.amazon.com/cli/[AWS CLI] \ No newline at end of file