diff --git a/docs/configuration.md b/docs/configuration.md index 75edcddb8..37f017f53 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,30 +1,10 @@ # Configuring the Kai-IDE Plugin -## Running Kai RPC server - -1. Users will land on the welcome page after installation as shown below. If the Welcome Page does not appear, proceed to the step 2. - ![walkthrough](images/walkthrough-1.png) - If "Set up Konveyor" is not available in the list, click the More button for additional options. - ![walkthrough](images/walkthrough-2.png) -2. If the welcome page does not appear, open the command palette by pressing Command + Shift + P. This will bring up a list of commands. - ![walkthrough](images/walkthrough-3.png) - From the command palette, locate and select the "Set up Konveyor" option. This will guide you through the configuration process. - ![walkthrough](images/walkthrough-4.png) -3. Configure Konveyor for your project. - - User has an option to override binaries and custom rules, however it comes with the default packaged binaries and custom rules. - ![setup-konveyor](images/setup-konveyor.png) - - The Konveyor extension allows you to add custom rules to the analyzer. This is useful when you want to apply your own rules during analysis. - - Configuring analysis arguments is necessary to determine which rules apply to the project during analysis. Set up analysis arguments specific to your project by selecting the appropriate options and pressing "OK" or "Enter" to save the changes. - - To confirm your arguments, navigate to your project directory and open `/.vscode/settings.json`. - ![setup-konveyor](images/setup-konveyor-2.png) - - Next, set up the Generative AI key for your project. This step will open the `provider-settings.yaml` file. By default, it is configured to use OpenAI. 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. Sample of the `provider-settings.yaml` can be found [here.](https://github.com/konveyor/editor-extensions/blob/main/vscode/resources/sample-provider-settings.yaml) -4. Once the configuration is done, click on start server button. Logs are collected at output channel named konveyor-analyzer. - ![start-server](images/start-server.png) +For initial configuration, see the [configure analysis](./getting_started.md#configure-analysis) steps in the Getting Started guide. ## Advanced Configuration -To navigate to **Advanced Settings**, open: -**Settings** > **Settings...** > **Settings** +Access the Kai settings from `Extensions > Konveyor AI Extension for VS Code settings icon > Settings`. This will bring you to the screen shown below. ![advancedConfig](images/advanced_config.png) @@ -33,41 +13,48 @@ This will bring you to the screen shown below. #### **Log Level** -Defines the logging level for server binaries. Logs can be found in your project directory under `/.vscode/konveyor-logs`. The verbosity of event logs can be increased or decreased using this option. - -#### **Kai RPC Server Path** - -Allows the user to specify a custom binary path. If not provided, the default binary will be used. +Defines the logging level for server binaries. Logs can be found in your project directory under `/.vscode/konveyor-logs`. +The verbosity of event logs can be increased or decreased using this option. #### **Analyzer Path** Allows the user to specify a custom analyzer binary path. If not provided, the default analyzer binary will be used. -### **Analysis Settings** +#### **Diff: Auto Accept on Save** + +Allows users to automatically apply diff changes when saving files. + +#### **Analysis: Analyze on Save** + +Enables real-time analysis upon saving a file. +This is automatically enabled while using Agent Mode + +#### **Genai: Agent Mode** + +Use agentic flow for getting solutions using automatic analysis. +Read more about Agent Mode [here](./getting_started.md#agent-mode). + +#### **Genai: Cache Dir** + +Path to a directory containing cached responses + +#### **Genai: Trace Dir** + +Path to directory containing traces of LLM interactions + +#### **Genai: Trace Enabled** -- **Use Default Rulesets**: Users can choose to **disable bundled rulesets** and customize them instead. -- **Custom Rules**: Allows users to define **custom rules** for more personalized analysis results. -- **Label Selector**: Defines source and target technologies to flag relevant incidents. -- **Analyze on Save**: Enables real-time analysis upon saving a file. Users can disable this feature if needed. -- **Analyzer Dependencies**: Kai can analyze dependency-related errors detected in LLM-generated responses. -- **Analyzer Known Libraries**: Allows Kai to analyze well-known open-source libraries. -- **Code Snippet Limit**: Sets the maximum number of code lines included in incident reports. -- **Context Lines**: Defines the number of context lines included in incident reports, which improves LLM accuracy. -- **Incident Limit**: Specifies the **maximum number of incidents** to be reported. +Enables tracing of communication with the model. If enabled, traces will be stored under `/.vscode/konveyor-logs/traces`. -### **Diff Editor Type** +#### **Genai: Demo Mode** -Allows users to change the **diff editor view** when resolving proposed solutions. +Enables Kai’s **demo mode**, which uses cached LLM responses for learning and testing functionality. +Click [here](./demo_mode.md) for more information on Demo Mode. -### **Kai Settings** +#### **Solution Server** -- **Get Solution Max Effort**: Defines the effort level for generating solutions. This can be adjusted depending on the type of incidents. Higher values **increase processing time**. -- **Get Solution Max LLM Queries**: Specifies the **maximum number of LLM queries** made per solution request. -- **Get Solution Max Priority**: Determines the **maximum priority level** of issues to be considered in a solution request. -- **Cache Directory**: Path to a directory containing **cached responses**. -- **Demo Mode**: Enables Kai’s **demo mode**, which uses cached LLM responses for learning and testing functionality. -- **Trace Enabled**: Enables tracing of communication with the model. If enabled, traces will be stored under `/.vscode/konveyor-logs/traces`. +Configuration for the solution server. Read more details [here](./getting_started.md#solution-server). -### **Logging Settings** +#### **Debug: Webview** -- **Trace Message Connection**: Enables tracing of JSON-RPC calls between the extension and the Kai server. +Debug logging for webview message handilng diff --git a/docs/custom_ruleset.md b/docs/custom_ruleset.md index 551cb060f..685be5d72 100644 --- a/docs/custom_ruleset.md +++ b/docs/custom_ruleset.md @@ -1,71 +1,66 @@ # Custom Rules Integration -When you have written custom rules and would like to add them to your issues to be solved by Kai's reactive code plan you will need to take a few steps to make this work. +When you have written custom rules and would like to add them to your issues to be solved by Kai's reactive code plan. +You will need to take a few steps to make this work. ## Steps to Add Custom Rulesets ### Stop the Running Server -If the server is running you will need to stop it. To see if the server is running. +If the server is running you will need to stop it. +To see if the server is running, open the `Konveyor Analysis View` ![image](images/custom_rules/running_server.png) -You will need to click the `Stop` button here and see the server is not running. - -![image](images/custom_rules/stopped_server.png) +You will need to click the `Stop` button here if the server is running. Once the server is stopped, you can move on to the next step. ### Adding Custom Rulesets -To add your custom rulesets, you will need to have a directory, containing `ruleset.yaml` and the subsequent rule files. You can find good examples of that [here](https://github.com/konveyor/rulesets/tree/main/default/generated) as well as docs around [rules and rulesets](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md). +To add your custom rulesets, you will need to have a directory containing a `ruleset.yaml` file, and the subsequent rule files. You can find examples of that [here](https://github.com/konveyor/rulesets/tree/main/default/generated) as well as docs around [rules and rulesets](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md). > [!IMPORTANT] -> For the next example of how to add, we will assume a ruleset at `/Users/user/rulesets/custom-ruleset` you will need to change this to point to your ruleset directory. - -First you will need to open up the settings for the workspace. you can do this with `CMD + SHIFT + P` on mac and `CTRL + SHIFT + P` on Windows and Linux. - -![image](images/open_settings.png) +> For the next example, we will assume a ruleset at `/Users/user/rulesets/custom-ruleset`. You will need to change this to point to your ruleset directory. -Next, search for the custom rules and find the `Konveyor > Analysis: Custom Rules` setting option. +First you will need to open up the `Profile Manager` in the `Get Ready to Analyze` view: ![image](images/custom_rules/search_custom_rules.png) -Then you can click `Add Item` and enter in your path, we will use the example path. +Then you can click `Select Custom Rules`, and select the custom rules in your path. We will use the example path. ![image](images/custom_rules/add_custom_ruleset.png) -Once you click `OK` the ruleset is added! - ### Running Analysis -Now you will have to go back to the `Konveyor` view and start the server. +Now you can return to the `Konveyor Aanlysis View` page and start the server. ![image](images/custom_rules/running_server.png) -You can now click `Run Analysis` and your custom ruleset will be used. +Click `Run Analysis`, and your custom ruleset will be used. > [!WARNING] > You will need to make sure that the rules or rulesets have a target or source label that is selected. If the ruleset does not match a selected target or source, it will be filtered out and skipped. ## Creating Rules and Rulesets -### Creating Rules - -To create your own rules, first, you need to know of a change that must happen to complete a migration. This could be because of a framework or library that you are using (either an internal one or external/open source one). For this section, I am going to create a rule and ruleset for an open source framework but the process should be similar for any custom rule. +### Determing rules -#### Finding A Rule +To create custom rules, you need to know of a change that must happen to complete a migration. This could be because of a framework or library that you are using (either an internal one or external/open source one). +For this section, I am going to create a rule and ruleset for an open source framework, but the process should be similar for any custom rule. To find a place for a rule, we are going to look at the release notes of the Quarkus framework. If we see the [section](https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.18#kubernetes-client-fabric8) here. If we follow this to the migration guide for this dependency, we can see this [section](https://github.com/fabric8io/kubernetes-client/blob/main/doc/MIGRATION-v7.md#kubernetes-model-artifact-removed-). -> The Maven artifact io.fabric8:kubernetes-model has been removed from the project and is no longer published. -> This artifact was just an aggregator of some of the Kubernetes model artifacts and had no specific purpose. It is no longer published, the io.fabric8:kubernetes-client-api or io.fabric8:kubernetes-openshift-uberjar artifacts should be used instead. +> The Maven artifact `io.fabric8:kubernetes-model` has been removed from the project, and is no longer published. +> This artifact was an aggregator of some of the Kubernetes model artifacts, and had no specific purpose. `io.fabric8:kubernetes-client-api` or `io.fabric8:kubernetes-openshift-uberjar` artifacts should be used instead. -So for this, we will need to make sure that if the dependency `io.fabric8:kubernetes-model` is being used, that we alert the user, and tell them what they should be using instead. +We will need to make sure that if the dependency `io.fabric8:kubernetes-model` is being used, that we alert the user, and tell them what they should be using instead. -#### Creating a Rule +### Creating the custom rule -Now we need to look up the rules and what the java provider can do. The [rules](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#rule-metadata) documentation states that we will need to set up the metadata first. In this case, we will use the below yaml for this. +Now we need to see how a rule is configured. + +- The [rules](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#rule-metadata) documentation states that we will need to set up the metadata first. In this case, we will use the below yaml for this. ```yaml - ruleID: "fabric8-remove-kubernetes-model-00001" @@ -75,7 +70,7 @@ Now we need to look up the rules and what the java provider can do. The [rules]( category: mandatory ``` -Next, we will add a description. This description is going to be used by the front end to show the user what the issue entails, I think that the migration docs do a good job of describing this, so we can just use what they have. +- Next, we will add a description. This description will describe what issue entails. I think the migration docs do a good job of this, so we can use what is mentioned there: ```yaml description: | @@ -84,15 +79,14 @@ description: | This artifact was just an aggregator of some of the Kubernetes model artifacts and had no specific purpose. It is no longer published, the io.fabric8:kubernetes-client-api or io.fabric8:kubernetes-openshift-uberjar artifacts should be used instead." ``` -Next, we need to decide what `Action` to take. The [actions](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#rule-actions) are very useful but it is worth noting that for Kai, the only action that will be used, is `message`. +- Next, we need to decide what [Action](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#rule-actions) to take. It is worth noting that for Kai, the only action that will be used is `message`. + The message is used by the LLM to generate a fix for the issue. > [!WARNING] > If you use only the tag action, or if you don't set effort, then the rule's violations will not be used by Kai. -We need to note, that the message is used by the LLM to generate a fix for the issue. In this case, I still think the migration guide docs do a good job. - > [!NOTE] -> This process may require some iteration to determine the optimal message for generating the fix that you want for your issue and model. +> This process may require some iteration to determine the optimal message for generating the fix for your issue and model. ```yaml message: | @@ -101,9 +95,8 @@ We need to note, that the message is used by the LLM to generate a fix for the i This artifact was just an aggregator of some of the Kubernetes model artifacts and had no specific purpose. It is no longer published, the io.fabric8:kubernetes-client-api or io.fabric8:kubernetes-openshift-uberjar artifacts should be used instead." ``` -Now that we have all the information captured in our rule for using it in Kai, we need to add when this should be triggered. This is the `when` clause for a rule. We usually call these [conditions](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#rule-conditions), you can do a lot of different things here based on providers. Today in Kai, we only have two providers, the `java` and `builtin` providers. - -For this issue, we are looking at dependencies, and so we will choose to use the `java.dependency` [capability](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#provider-condition). +- Now that we have all the information captured in our rule for using it in Kai, we need to add when this should be triggered. This is the `when` clause for a rule. We call these [conditions](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#rule-conditions). Different providers will support different conditions. Today in Kai, we only have two providers, the `java` and `builtin` providers. + - For this issue, we are looking at dependencies, and so we will choose to use the `java.dependency` [capability](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#provider-condition). ```yaml when: @@ -111,9 +104,9 @@ For this issue, we are looking at dependencies, and so we will choose to use the name: io.fabric8.kubernetes-model ``` -Now, we should save this file in a directory for this ruleset, and we will need to create a ruleset.yaml in the same directory. - -Creating the [ruleset.yaml](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#ruleset) is a special file that groups these rules together to help make their management easier. We will use this ruleset for this rule. +- Save this file in a directory for this ruleset, and create a `ruleset.yaml` in the same directory. + - The [ruleset.yaml](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#ruleset) is a special file that groups these rules together to help make their management easier. + We will use this ruleset for this rule: ```yaml name: quarkus-3-18 @@ -122,4 +115,4 @@ labels: - "konveyor.io/target=quarkus" ``` -This full rule should now be usable, you can see it [here](./custom-ruleset-example), with the ruleset.yaml that would be needed. To use this ruleset, now follow the [adding custom rules](#steps-to-add-custom-rulesets) section to use this ruleset! +This custom ruleset should now be usable for an analysis in Kai. diff --git a/docs/debug.md b/docs/debug.md index c6a45e653..b224b858b 100644 --- a/docs/debug.md +++ b/docs/debug.md @@ -1,10 +1,16 @@ # Debug Kai And File Issues -Logs are divided into two separate files under your working directory at /.vscode/konveyor-logs: +## Helpful logs -- kai-analyzer-server.log: This file is useful for debugging issues related to running analysis. It provides details about the Java and Maven installation, the initialization of the Java connection, and the startup process of the analyzer server. +Under your working directory at `/.vscode/konveyor`: -- kai-rpc-server.log: This log is intended for debugging the RPC server and any communication with the AI system. It captures interactions involved in fixing incidents and retrieving results. +- `analysis_<>.json` is an analysis output file that gives details on the rules used during analysis. + +Use `Ctrl + Shift + P` to open the command palette and search for: `Developer: Open Extension Logs Folder` with logs at `konveyor.konveyor/` + +- `analyzer.log`: This file is useful for debugging issues related to running analysis. It provides details about the Java and Maven installation, the initialization of the Java connection, and the startup process of the analyzer server. + +- `extension.log`: This log is intended for debugging the RPC server and solution server, and any communication with the AI system. It captures interactions involved in fixing incidents and retrieving results. ## File an Issue @@ -45,4 +51,4 @@ Help us resolve your issue faster by providing detailed information. Please foll - **No Incidents Found**: Check the `.vscode/settings.json` file in your working directory to ensure the targets are correctly recorded. -- **Failed to Run Initial Analysis**: Verify that the correct Java and Maven versions are set in the current environment. Detailed logs can be found in `kai-analyzer-server.log`. +- **Failed to Run Initial Analysis**: Verify that the correct Java and Maven versions are set in the current environment. Detailed logs can be found [above](#helpful-logs). diff --git a/docs/demo_mode.md b/docs/demo_mode.md index af24a78c4..69ba37c4c 100644 --- a/docs/demo_mode.md +++ b/docs/demo_mode.md @@ -29,18 +29,15 @@ Now, you will need to add the path you would like to use for the cache to the JS ![image](images/demo_mode/cache_dir_json_settings.png) -The key to use is `conveyor.kai.cacheDir`, and the value is an absolute path to a location on your hard drive. In the example, I am putting the cache to `/Users/shurley/repos/kai/cache,` but you can change this to wherever you would like to store it. +The key to use is `konveyor.kai.cacheDir`, and the value is an absolute path to a location on your hard drive. In the example, I am putting the cache to `/Users/shurley/repos/kai/cache,` but you can change this to wherever you would like to store it. ### Configure Demo Mode To configure demo mode, you must open the settings panel again. - -![image](images/open_settings.png) +See the first step [here](#configure-cache-directory) if needed. Now, you will search for `kai.demo` and find the setting for demo mode. -![image](images/demo_mode/searched_kai_cache_dir.png) - Select the checkbox if it is not already selected, and you should be all set! ![image](images/demo_mode/select_demo_mode_on.png) diff --git a/docs/getting_started.md b/docs/getting_started.md index f8069819d..2303bb714 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -1,54 +1,53 @@ # Getting Started -- [Getting Started](#getting-started) - - [Overview](#overview) - - [Installation](#installation) - - [Configuration](#configuration) - - [Starting the RPC Server](#starting-the-rpc-server) - - [Using Kai for analysis and fixes](#using-kai-for-analysis-and-fixes) - - [Guided scenario](#guided-scenario) +- [Overview](#overview) +- [Install IDE Extension](#install-ide-extension) +- [Configure Analysis](#configure-analysis) + - [Kai settings](#configure-kai-settings) + - [Analysis settings](#configure-analysis-settings) +- [Starting the RPC Server](#starting-the-rpc-server) +- [Using Kai for Analysis and Fixes](#using-kai-for-analysis-and-fixes) + - [Running Analysis](#running-analysis) + - [Solution Server](#solution-server) + - [Agent Mode](#agent-mode) +- [Guided scenarios](#guided-scenarios) ## Overview -Before you install Kai, you must: +#### Before you install Kai, you must: - Create an API key for an LLM model. - - Supported LLM providers: **OpenAI**, Amazon Bedrock, **Azure OpenAI**, DeepSeek, Google Gemini, Ollama - - OpenAI-API-compatible endpoints such as OpenShift AI + + - Supported LLM providers: **OpenAI**, Amazon Bedrock, **Azure OpenAI**, DeepSeek, Google Gemini, Ollama, OpenAI-API-compatible endpoints such as OpenShift AI + - To see more information about LLM provider configuration, see the [LLM selection](./llm_selection.md) documentation. - Install Language Support for Java(TM) by Red Hat extension -- Install Java v17 and later +- Install Java v17 and later - Install Maven v3.9+ - Install Git and add it to the `$PATH` variable -- Configure an application in Visual Studio Code +- Configure an application in Visual Studio Code -Running Kai consists of: +#### Running Kai consists of: 1. Installing the Kai VSCode extension 1. Configuring Kai for your desired use case 1. Running analysis and accepting/rejecting generated code fixes -## Installation +## Install IDE Extension See the [installation guide](./installation.md) for details on installing the IDE extension. -## Configuration +## Configure Analysis + +> [!NOTE] +> You must open an application in your VSCode workspace to use the Kai extension. [![Kai first screen](https://i.ytimg.com/vi/IBa8B_RluGs/hqdefault.jpg)](https://youtu.be/IBa8B_RluGs) -Click the Kai VSCode extension to perform the following tasks: -1. [Configure Kai settings](#configure-kai-settings) -1. [Configure settings for analysis](#configure-settings-for-analysis) -1. [Starting the RPC server](#starting-the-rpc-server) -1. [Using Kai for analysis and fixes](#using-kai-for-analysis-and-fixes) - -> [!NOTE] -> You must open an application in your VSCode workspace to use the Kai extension. - -### Configure Kai settings +### Configure Kai Settings [![Kai configuration settings](https://i.ytimg.com/vi/BgWZcFT7XjQ/hqdefault.jpg)](https://youtu.be/BgWZcFT7XjQ) @@ -56,25 +55,55 @@ Click the Kai VSCode extension to perform the following tasks: Access the Kai settings from `Extensions > Konveyor AI Extension for VS Code settings icon > Settings`. -You can configure basic settings such as: -- Configure the solution server endpoint -- Select the editor view for analysis: diff or merge -- (Optional) Choose the agent mode for automated analysis with manual review -- (Optional) Choose the demo mode to use cached responses from the LLM +You can configure settings such as: + +- The **solution server**. See [MCP Solution Server setup](../kai_mcp_solution_server/README.md) +- **Agent mode** for automated analysis with manual review +- **Demo mode** to use cached responses from the LLM. More details can be found [here](demo_mode.md). +- **Custom analyzer and Kai binaries** as opposed to the default packaged ones. + - This provision can be useful for testing changes though it shouldn't be necessary for most users. See the [contributing guide](contrib/dev_environment.md) for more information. + +#### Solution Server + +example config in `settings.json`: + +```json + "konveyor.solutionServer": { + "url": "http://localhost:8000/", + "auth": { + "enabled": true, + "realm": "tackle", + "insecure": true, + }, + "enabled": true + }, +``` + +The solution server primarily provides two benefits: -### Configure settings for analysis +- Contextual hints: It surfaces examples of past migration solutions, enabling Kai to offer hints for difficult or previously unsolved migration problems. +- Migration success metrics: It exposes success metrics for each rule, derived from past migrations. These metrics provide a "confidence level" for the likelihood of Kai successfully migrating a given code segment. -You can configure the initial profile and other settings on the `Get Ready to Analyze` page or by modifying `settings.json`. For more details; see [configuration](./contrib/configuration.md) for a full list of available settings. +#### Agent Mode + +In the agent mode, a 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. +You can 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. + +### Configure Analysis Settings + +You can configure the initial profile and other settings on the `Get Ready to Analyze` page or by modifying `settings.json`. +For more details, see [configuration](./contrib/configuration.md) for a full list of available settings. + +To go to the `Get Ready to Analyze` page, + +- Click `Konveyor extension > Open Konveyor Analysis View (icon) > Settings (icon)`. +- Type `Ctrl + Shift + P` to open the Command Palette and type "Konveyor:Manage Analysis Profile". [![Kai profile settings](https://i.ytimg.com/vi/6YN_pGGMSW4/hqdefault.jpg)](https://youtu.be/6YN_pGGMSW4) -To go to the `Get Ready to Analyze` page, - - Click `Konveyor extension > Open Konveyor Analysis View (icon) > Settings (icon)`. - - Type `Ctrl + Shift + P` to open the Command Palette and type "Konveyor:Manage Analysis Profile". - -You can access the following configurations on the `Get Ready to Analyze` page: +You can access the following analysis configurations on the `Get Ready to Analyze` page: - Select Profile - Configure a Label selector (source and target technologies) @@ -83,17 +112,13 @@ You can access the following configurations on the `Get Ready to Analyze` page: Edit these settings by using the `Profile Manager` page to reuse the configuration for multiple analyses. -#### Override analyzer binary - -You can configure custom analyzer and Kai binaries as opposed to the default packaged ones. This provision can be useful for testing changes though it shouldn't be necessary for most users. See the [contributing guide](contrib/dev_environment.md) for more information. - -#### Configure custom rules +#### Configure Custom Rules You can configure custom rules for the Konveyor analyzer to use when running static code analysis. To do so, edit `Set Rules` on the `Get Ready to Analyze` page to open the `Profile Manager`. You can select the directory that contains the custom rules. For information about creating custom rules, see the [rules documentation](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#rules). -#### Configure analysis arguments +#### Configure Sources/Targets On the `Profile Manager` page, you can select or create the sources and target technologies for the static code analysis. They are _**mutually exclusive**_ options: you should select one or the other. @@ -112,38 +137,28 @@ To understand the label selector syntax see the [rule label selector documentati - -#### Configure the generative AI API key - -On the `Get Ready to Analyze` page, you can configure the LLM API key needed for Kai analysis. - -[![Kai generative AI API key configuration](https://i.ytimg.com/vi/F4Va8KFqYV4/hqdefault.jpg)](https://youtu.be/F4Va8KFqYV4) - - - -To see more information about LLM provider configuration, see the [LLM selection](./llm_selection.md) documentation. +![image](images/walkthroughs_configure_analysis_label_selector.png) No longer found in the profile settings--> -## Starting the RPC server +## Starting the RPC Server -Click `Start` to start the RPC server on the `Konveyor Analysis View` page. This action activates the `Run Analysis` button. +Click `Start` to start the RPC server on the `Konveyor Analysis View` page. This action activates the `Run Analysis` button. ![image](images/start-rpc-server.png) -## Using Kai for analysis and fixes +## Using Kai for Analysis and Fixes Now that you installed and started Kai, you can use the Kai extension to run static code analysis and generate code fixes. Once analysis is performed, you can review a list of violations and their associated incidents. Currently, you can generate code fixes based on incidents. -### Running analysis +### Running Analysis -After starting the RPC server on the `Konveyor Analysis View` page, you can run a full analysis of the codebase based on the prior configured analysis arguments by clicking `Run Analysis`. +After starting the RPC server on the `Konveyor Analysis View` page, you can run a full analysis of the codebase based on the prior configured analysis arguments by clicking `Run Analysis`. > [!NOTE] > You must select a profile with necessary configurations such as source and target technologies before you run an analysis. After analysis completes, you will see violations and incidents generated as a result. In the `Konveyor Issues` pane, you will see a tree view of these incidents and the files that contain these incidents. -### Generating fixes +#### Generating Fixes Now that you have violations from analysis, you will want to begin generating code fixes based on these incidents. You can generate fix suggestions by selecting the spanner button associated with a specific issue or all issues. @@ -154,7 +169,7 @@ You can see more details if there are more than one incident by expanding the is Once the fix is generated, you can see a list of files that will be changed, and you are given the option to view, accept, or reject those changes. You can view this from an in-view diff editor via the analysis view, or in the `Konveyor Resolutions` pane. When you accept these changes, the changes are updated in the source code directly. Anytime you accept a change, Kai will automatically rerun a partial analysis of the updated codebase with the fix for an incident that was resolved. -## Guided scenario +## Guided Scenarios Now that you understand how to get started with Kai, we suggest that you go through a [guided scenario](./scenarios/README.md) to get a better idea of how Kai can assist with the migration of an application. diff --git a/docs/images/advanced_config.png b/docs/images/advanced_config.png index fa5bb4d5d..3fb567763 100644 Binary files a/docs/images/advanced_config.png and b/docs/images/advanced_config.png differ diff --git a/docs/images/custom_rules/add_custom_ruleset.png b/docs/images/custom_rules/add_custom_ruleset.png index 534d6cc28..3f70069bf 100644 Binary files a/docs/images/custom_rules/add_custom_ruleset.png and b/docs/images/custom_rules/add_custom_ruleset.png differ diff --git a/docs/images/custom_rules/running_server.png b/docs/images/custom_rules/running_server.png index 53cff3ab4..6c5f1fc1c 100644 Binary files a/docs/images/custom_rules/running_server.png and b/docs/images/custom_rules/running_server.png differ diff --git a/docs/images/custom_rules/search_custom_rules.png b/docs/images/custom_rules/search_custom_rules.png index 2416d9704..9b03ffa1b 100644 Binary files a/docs/images/custom_rules/search_custom_rules.png and b/docs/images/custom_rules/search_custom_rules.png differ diff --git a/docs/images/custom_rules/stopped_server.png b/docs/images/custom_rules/stopped_server.png deleted file mode 100644 index f2e04994e..000000000 Binary files a/docs/images/custom_rules/stopped_server.png and /dev/null differ diff --git a/docs/images/demo_mode/kai_demo_mode_search.png b/docs/images/demo_mode/kai_demo_mode_search.png index 8b7e41491..307e095cc 100644 Binary files a/docs/images/demo_mode/kai_demo_mode_search.png and b/docs/images/demo_mode/kai_demo_mode_search.png differ diff --git a/docs/images/open_settings.png b/docs/images/open_settings.png index 950ca4320..f147cab36 100644 Binary files a/docs/images/open_settings.png and b/docs/images/open_settings.png differ diff --git a/docs/images/resolve-issues.png b/docs/images/resolve-issues.png index ca341f031..6a78bff62 100644 Binary files a/docs/images/resolve-issues.png and b/docs/images/resolve-issues.png differ diff --git a/docs/images/setup-konveyor-2.png b/docs/images/setup-konveyor-2.png deleted file mode 100644 index 6af90143a..000000000 Binary files a/docs/images/setup-konveyor-2.png and /dev/null differ diff --git a/docs/images/setup-konveyor.png b/docs/images/setup-konveyor.png deleted file mode 100644 index b799b39a2..000000000 Binary files a/docs/images/setup-konveyor.png and /dev/null differ diff --git a/docs/images/start-rpc-server.png b/docs/images/start-rpc-server.png index 8d6c929d2..54fc2760e 100644 Binary files a/docs/images/start-rpc-server.png and b/docs/images/start-rpc-server.png differ diff --git a/docs/images/start-server.png b/docs/images/start-server.png deleted file mode 100644 index e5d9cef22..000000000 Binary files a/docs/images/start-server.png and /dev/null differ diff --git a/docs/images/walkthrough-1.png b/docs/images/walkthrough-1.png deleted file mode 100644 index 6241933a7..000000000 Binary files a/docs/images/walkthrough-1.png and /dev/null differ diff --git a/docs/images/walkthrough-2.png b/docs/images/walkthrough-2.png deleted file mode 100644 index 9541b322e..000000000 Binary files a/docs/images/walkthrough-2.png and /dev/null differ diff --git a/docs/images/walkthrough-3.png b/docs/images/walkthrough-3.png deleted file mode 100644 index 2306c4cdd..000000000 Binary files a/docs/images/walkthrough-3.png and /dev/null differ diff --git a/docs/images/walkthrough-4.png b/docs/images/walkthrough-4.png deleted file mode 100644 index 0bbf72957..000000000 Binary files a/docs/images/walkthrough-4.png and /dev/null differ