Copilot: Add setting for automatic completion

Can be used to turn off the automatic completion insertion, so a user
only can request suggestions explicitly via the shortcut.

Change-Id: I0c4d9e2f41d30312b0870facdd80dc1d3d03d809
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
David Schulz
2023-04-18 15:09:01 +02:00
parent 21c71cded7
commit afcbe845ce
4 changed files with 12 additions and 0 deletions

View File

@@ -58,8 +58,15 @@ CopilotSettings::CopilotSettings()
distPath.setHistoryCompleter("Copilot.DistPath.History");
distPath.setDisplayName(Tr::tr("Agent.js path"));
autoComplete.setDisplayName(Tr::tr("Auto Complete"));
autoComplete.setLabelText(Tr::tr("Request completions automatically"));
autoComplete.setDefaultValue(true);
autoComplete.setToolTip(Tr::tr("Automatically request suggestions for the current text cursor "
"position after changes to the document"));
registerAspect(&nodeJsPath);
registerAspect(&distPath);
registerAspect(&autoComplete);
}
} // namespace Copilot