forked from qt-creator/qt-creator
Doc: Fix formatting in .lua file
Change-Id: Ia0c5d44a483e998b16d9307b2df7e1d3998090e6 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -12,100 +12,100 @@ return {
|
|||||||
Experimental = true,
|
Experimental = true,
|
||||||
DisabledByDefault = true,
|
DisabledByDefault = true,
|
||||||
LongDescription = [[
|
LongDescription = [[
|
||||||
Qt AI Assistant is a coding assistant. When connected to a Large Language
|
Qt AI Assistant is a coding assistant. When connected to a Large Language
|
||||||
Model (LLM), it auto-completes your code, as well as writes test cases and
|
Model (LLM), it auto-completes your code, as well as writes test cases and
|
||||||
code documentation.
|
code documentation.
|
||||||
|
|
||||||
Qt AI Assistant is available for selected commercial Qt developer
|
Qt AI Assistant is available for selected commercial Qt developer
|
||||||
license holders. For more information on licensing, select `Compare`
|
license holders. For more information on licensing, select `Compare`
|
||||||
in [Qt pricing](https://www.qt.io/pricing).
|
in [Qt pricing](https://www.qt.io/pricing).
|
||||||
|
|
||||||
> **Note:** Qt AI Assistant is LLM-agnostic. The subscription to a third-party
|
> **Note:** Qt AI Assistant is LLM-agnostic. The subscription to a third-party
|
||||||
LLM service or a third-party LLM for local or cloud deployment is not a part
|
LLM service or a third-party LLM for local or cloud deployment is not a part
|
||||||
of it. You need to connect to a third-party LLM and agree to the terms and
|
of it. You need to connect to a third-party LLM and agree to the terms and
|
||||||
conditions, as well as to the acceptable use policy of the LLM provider. By
|
conditions, as well as to the acceptable use policy of the LLM provider. By
|
||||||
using Qt AI Assistant, you agree to
|
using Qt AI Assistant, you agree to
|
||||||
[Terms & Conditions - Qt Development Framework](https://www.qt.io/terms-conditions/qt-dev-framework).
|
[Terms & Conditions - Qt Development Framework](https://www.qt.io/terms-conditions/qt-dev-framework).
|
||||||
|
|
||||||
Qt AI Assistant is currently experimental and powered by generative AI. Check
|
Qt AI Assistant is currently experimental and powered by generative AI. Check
|
||||||
all suggestions to make sure that they are fit for use in your project.
|
all suggestions to make sure that they are fit for use in your project.
|
||||||
|
|
||||||
> **Note:** [Install and load](https://doc.qt.io/qtcreator/creator-how-to-load-extensions.html)
|
> **Note:** [Install and load](https://doc.qt.io/qtcreator/creator-how-to-load-extensions.html)
|
||||||
the Qt AI Assistant extension to use it.
|
the Qt AI Assistant extension to use it.
|
||||||
|
|
||||||
## Connect to a LLM
|
## Connect to a LLM
|
||||||
|
|
||||||
You can connect to the following LLMs:
|
You can connect to the following LLMs:
|
||||||
- Meta Llama 3.1 70B (running in a cloud deployment of your choice
|
- Meta Llama 3.1 70B (running in a cloud deployment of your choice
|
||||||
- Anthropic Claude 3.5 Sonnet (provided as subscription-based service by Anthropic)
|
- Anthropic Claude 3.5 Sonnet (provided as subscription-based service by Anthropic)
|
||||||
|
|
||||||
To connect to a LLM:
|
To connect to a LLM:
|
||||||
|
|
||||||
1. Go to `Preferences` > `AI Assistant`
|
1. Go to `Preferences` > `AI Assistant`
|
||||||
1. Select the use cases and programming languages to use the LLM for
|
1. Select the use cases and programming languages to use the LLM for
|
||||||
1. Enter the authentication token, user name, and API URL of the LLM.
|
1. Enter the authentication token, user name, and API URL of the LLM.
|
||||||
For more information on where to get the access information, see the
|
For more information on where to get the access information, see the
|
||||||
third-party LLM provider documentation.
|
third-party LLM provider documentation.
|
||||||
|
|
||||||
## Automatic code-completio
|
## Automatic code-completion
|
||||||
|
|
||||||
Qt AI Assistant can help you write code by suggesting what to write next.
|
Qt AI Assistant can help you write code by suggesting what to write next.
|
||||||
It prompts the LLM to make one or several code suggestions based on the
|
It prompts the LLM to make one or several code suggestions based on the
|
||||||
current cursor position and the code before and after the cursor when you
|
current cursor position and the code before and after the cursor when you
|
||||||
stop typing. The code suggestions are shown after the cursor in grey color.
|
stop typing. The code suggestions are shown after the cursor in grey color.
|
||||||
|
|
||||||
To accept the entire suggestion, press the `Tab` key.
|
To accept the entire suggestion, press the `Tab` key.
|
||||||
|
|
||||||
To accept parts of the suggestions, press `Alt+Right`.
|
To accept parts of the suggestions, press `Alt+Right`.
|
||||||
|
|
||||||
To dismiss the suggestion, press `Esc` or navigate to another position in
|
To dismiss the suggestion, press `Esc` or navigate to another position in
|
||||||
the code editor.
|
the code editor.
|
||||||
|
|
||||||
To interact with Qt AI Assistant using the mouse, hover over the suggestion.
|
To interact with Qt AI Assistant using the mouse, hover over the suggestion.
|
||||||
|
|
||||||
When you hover over a suggestion, you can accept parts of the suggested code
|
When you hover over a suggestion, you can accept parts of the suggested code
|
||||||
snippet word-by-word. Or, cycle through alternative suggestions in the code
|
snippet word-by-word. Or, cycle through alternative suggestions in the code
|
||||||
completion bar by selecting the `<` and `>` buttons.
|
completion bar by selecting the `<` and `>` buttons.
|
||||||
|
|
||||||
To close the code completion bar, press `Esc` key or move the cursor to
|
To close the code completion bar, press `Esc` key or move the cursor to
|
||||||
another position.
|
another position.
|
||||||
|
|
||||||
To turn auto-completion of code on or off globally for all projects, go to
|
To turn auto-completion of code on or off globally for all projects, go to
|
||||||
`Preferences` > `AI Assistant`. Qt AI Assistant consumes a significant number
|
`Preferences` > `AI Assistant`. Qt AI Assistant consumes a significant number
|
||||||
of tokens from the LLM. To cut costs, disable the auto-completion feature when
|
of tokens from the LLM. To cut costs, disable the auto-completion feature when
|
||||||
not needed, and use keyboard shortcuts for code completion.
|
not needed, and use keyboard shortcuts for code completion.
|
||||||
|
|
||||||
## Complete code from the keyboard
|
## Complete code from the keyboard
|
||||||
|
|
||||||
To trigger code suggestions manually, press `Ctrl+Shift+A` (`Cmd+Shift+A` on macOS).
|
To trigger code suggestions manually, press `Ctrl+Shift+A` (`Cmd+Shift+A` on macOS).
|
||||||
|
|
||||||
## Chat with the assistant
|
## Chat with the assistant
|
||||||
|
|
||||||
In an inline chat window in the code editor, you can prompt the assistant to
|
In an inline chat window in the code editor, you can prompt the assistant to
|
||||||
implement your requests in human language, ask questions, or execute
|
implement your requests in human language, ask questions, or execute
|
||||||
*smart commands*. To open the chat, press `Ctrl+Shift+D` (`Cmd+Shift+D` on macOS).
|
*smart commands*. To open the chat, press `Ctrl+Shift+D` (`Cmd+Shift+D` on macOS).
|
||||||
|
|
||||||
To close the chat, press `Esc` or select the `Close` button.
|
To close the chat, press `Esc` or select the `Close` button.
|
||||||
|
|
||||||
To go to Qt AI Assistant preferences from the chat, select the `Settings` button.
|
To go to Qt AI Assistant preferences from the chat, select the `Settings` button.
|
||||||
|
|
||||||
### Request suggestions using human language
|
### Request suggestions using human language
|
||||||
|
|
||||||
To request suggestions using human language, type your requests in the chat.
|
To request suggestions using human language, type your requests in the chat.
|
||||||
Qt AI Assistant shows a suggestion that you can copy to the clipboard by
|
Qt AI Assistant shows a suggestion that you can copy to the clipboard by
|
||||||
selecting the `Copy` button in the chat.
|
selecting the `Copy` button in the chat.
|
||||||
|
|
||||||
### Request test cases in Qt Test syntax
|
### Request test cases in Qt Test syntax
|
||||||
|
|
||||||
To write test cases with Qt AI Assistant:
|
To write test cases with Qt AI Assistant:
|
||||||
|
|
||||||
- Highlight code in the code editor
|
- Highlight code in the code editor
|
||||||
- Press `Ctrl+Shift+D` (`Cmd+Shift+D` on macOS) to open the chat
|
- Press `Ctrl+Shift+D` (`Cmd+Shift+D` on macOS) to open the chat
|
||||||
- Select the `qtest` smart command.
|
- Select the `qtest` smart command.
|
||||||
|
|
||||||
Qt AI Assistant generates a test case in [Qt Test](https://doc.qt.io/qt-6/qttest-index.html)
|
Qt AI Assistant generates a test case in [Qt Test](https://doc.qt.io/qt-6/qttest-index.html)
|
||||||
format that you can copy and paste to your
|
format that you can copy and paste to your
|
||||||
[Qt test project](https://doc.qt.io/qtcreator/creator-how-to-create-qt-tests.html.
|
[Qt test project](https://doc.qt.io/qtcreator/creator-how-to-create-qt-tests.html.
|
||||||
]],
|
]],
|
||||||
Dependencies = {
|
Dependencies = {
|
||||||
{ Id = "lua", Version = "14.0.0" },
|
{ Id = "lua", Version = "14.0.0" },
|
||||||
|
Reference in New Issue
Block a user