You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Access the Kai settings from `Extensions > Konveyor AI Extension for VS Code settings icon > Settings`.
29
58
30
-

59
+
You can configure basic settings such as:
60
+
- Configure the solution server endpoint
61
+
- Select the editor view for analysis: diff or merge
62
+
- (Optional) Choose the agent mode for automated analysis with manual review
63
+
- (Optional) Choose the demo mode to use cached responses from the LLM
31
64
32
-
### Options
65
+
### Configure settings for analysis
33
66
34
-
All of the following settings can be configured via the setup page or via
35
-
modifying `settings.json`. For more details; see [configuration](./contrib/configuration.md) for a full list of
36
-
available settings.
67
+
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.
- Type `Ctrl + Shift + P` to open the Command Palette and type "Konveyor:Manage Analysis Profile".
45
76
46
-
This allows you as a user to configure custom rules for the Konveyor analyzer
47
-
to use when running static code analysis. This can be done by selecting a
48
-
directory where these rules exist.
77
+
You can access the following configurations on the `Get Ready to Analyze` page:
49
78
50
-
For information on creating custom rules you can see the [documentation](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#rules)
79
+
- Select Profile
80
+
- Configure a Label selector (source and target technologies)
81
+
- Set rules (default and custom)
82
+
- Configure the generative AI API key
51
83
52
-
#### Configure Analysis Arguments
84
+
Edit these settings by using the `Profile Manager` page to reuse the configuration for multiple analyses.
53
85
54
-
This allows you as a user to define the sources and targets for static code
55
-
analysis.
86
+
#### Override analyzer binary
56
87
57
-
These are mutually exclusive options, you should select one or the other.
88
+
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.
58
89
59
-
Sources and Targets are special [labels](https://github.com/konveyor/analyzer-lsp/blob/main/docs/labels.md#labels). Selecting the sources and targets will generate the label selector for you.
90
+
#### Configure custom rules
91
+
92
+
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.
93
+
94
+
For information about creating custom rules, see the [rules documentation](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md#rules).
95
+
96
+
#### Configure analysis arguments
97
+
98
+
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.
99
+
100
+
Sources and Targets are special [labels](https://github.com/konveyor/analyzer-lsp/blob/main/docs/labels.md#labels) recognized by the analyzer. Selecting the sources or targets will generate the label selector that filters rules for the analysis.
60
101
61
102
> [!NOTE]
62
-
> These source and target labels are only coming from the [default rulesets](https://github.com/konveyor/analyzer-lsp/blob/main/docs/labels.md#labels). If you want to use custom labels you must create the label selector manually.
103
+
> These source and target labels are configured in the [default rulesets](https://github.com/konveyor/analyzer-lsp/blob/main/docs/labels.md#labels). If you want to use custom labels for Kai analysis, you must create the label selector in the profile.
104
+
105
+
To use this option, type the name of the custom source or target technology:
If you need/want to specify the label selector manually, you can define a specific label selector to use when querying the rulesets.
67
110
68
-
If you need/want to specify the label selector manually, you as a user can define a specific label selector to
69
-
use when querying the rulesets.
111
+
To understand the label selector syntax see the [rule label selector documentation](https://github.com/konveyor/analyzer-lsp/blob/main/docs/labels.md#rule-label-selector)
70
112
71
-
To understand the label selector syntax see the [documentation](https://github.com/konveyor/analyzer-lsp/blob/main/docs/labels.md#rule-label-selector)
113
+
<!--To use this option click
72
114
73
-
To use this option click
115
+
 No longer found in the profile settings-->
On the `Get Ready to Analyze` page, you can configure the LLM API key needed for Kai analysis.
78
120
79
-
This is where you set up the model configuration for kai to use. To see more information about this see the [llm selection](./llm_selection.md) documentation.
121
+
[](https://youtu.be/F4Va8KFqYV4)
80
122
81
-
## Starting the server
123
+
<!-- <iframe width="560" height="315" src="https://www.youtube.com/embed/F4Va8KFqYV4" title="Kai generative AI API key configuration" frameborder="0" allowfullscreen></iframe> -->
82
124
83
-
Click "Start Analyzer" to launch the RPC server. You can then click "Mark Done"
84
-
to close the setup page.
125
+
To see more information about LLM provider configuration, see the [LLM selection](./llm_selection.md) documentation.
85
126
86
-

127
+
## Starting the RPC server
87
128
88
-
## Usage
129
+
Click `Start` to start the RPC server on the `Konveyor Analysis View` page. This action activates the `Run Analysis` button.
89
130
90
-
Now that Kai is installed and started, using the extension consists of running
91
-
static code analysis and generating code fixes. Once analysis is performed, you
92
-
are presented with a list of violations and their associated incidents. Kai
93
-
currently allows the user to generate code fixes based on incidents.
131
+

132
+
133
+
## Using Kai for analysis and fixes
134
+
135
+
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.
94
136
95
137
### Running analysis
96
138
97
-
To start, the analysis view allows you to run a full analysis of the codebase
98
-
based on the prior configured analysis arguments. After analysis completes, you
99
-
will see violations and incidents generated as a result. On the left side of
100
-
the extension, you will see a tree view of these incidents and the files where
101
-
those incidents are present.
139
+
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`.
140
+
141
+
> [!NOTE]
142
+
> You must select a profile with necessary configurations such as source and target technologies before you run an analysis.
143
+
144
+
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.
102
145
103
146
### Generating fixes
104
147
105
148
Now that you have violations from analysis, you will want to begin generating
106
-
code fixes based on these incidents. This can be done by selecting the `Resolve Incident`button. You can choose to resolve any number of incidents at a time by clicking the button associated with the number.
149
+
code fixes based on these incidents. You can generate fix suggestions by selecting the spanner button associated with a specific issue or all issues.
107
150
108
-

151
+

109
152
110
-
You can see more details if there are more than one incident by expanding the row. Here you will have more options for resolving incidents.
153
+
You can see more details if there are more than one incident by expanding the issues row. Here, you will have more options for resolving incidents.
111
154
112
-
Once the fix is generated, you will be presented with a list of files that
113
-
would be changed, and you are given the option to view, accept, or reject those
114
-
changes. You can view this from an in-view diff editor via the analysis view,
115
-
or from the _Konveyor Resolutions_ tab. When these changes are accepted, the changes will be reflected in the source code
116
-
directly. Anytime a change is accepted, Kai will automatically rerun a partial
117
-
analysis of the codebase that has changed to update whether an incident was
118
-
resolved.
155
+
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.
119
156
120
-
## Guided Scenario
157
+
## Guided scenario
121
158
122
-
Now that you understand how to get started with Kai, we suggest running through
123
-
a [guided scenario](./scenarios/README.md) to get a better idea of how Kai can assist
124
-
with the migration of an application.
159
+
Now that you understand how to get started with Kai, we suggest that you go through
160
+
a [guided scenario](./scenarios/README.md) to get a better idea of how Kai can assist with the migration of an application.
0 commit comments