From 4625d9e87e3c83e93a323ed3734cc9a7d47f6fc5 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 22 Jun 2023 09:44:08 +0200 Subject: [PATCH] Copilot: Add a warning in the settings page ... about copilot operation. Change-Id: I9187f1759f183f4df393e057dc0cdb3307665afc Reviewed-by: Eike Ziller --- src/plugins/copilot/copilotoptionspage.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/plugins/copilot/copilotoptionspage.cpp b/src/plugins/copilot/copilotoptionspage.cpp index f37042b2d12..38c1869445f 100644 --- a/src/plugins/copilot/copilotoptionspage.cpp +++ b/src/plugins/copilot/copilotoptionspage.cpp @@ -27,9 +27,22 @@ public: { using namespace Layouting; + auto warningLabel = new QLabel; + warningLabel->setWordWrap(true); + warningLabel->setTextInteractionFlags(Qt::LinksAccessibleByMouse + | Qt::LinksAccessibleByKeyboard + | Qt::TextSelectableByMouse); + warningLabel->setText(Tr::tr( + "Enabling %1 is subject to your agreement and abidance with your applicable " + "%1 terms. It is your responsibility to know and accept the requirements and " + "parameters of using tools like %1. This may include, but is not limited to, " + "ensuring you have the rights to allow %1 access to your code, as well as " + "understanding any implications of your use of %1 and suggestions produced " + "(like copyright, accuracy, etc.)." ).arg("Copilot")); + auto authWidget = new AuthWidget(); - QLabel *helpLabel = new QLabel(); + auto helpLabel = new QLabel(); helpLabel->setTextFormat(Qt::MarkdownText); helpLabel->setWordWrap(true); helpLabel->setTextInteractionFlags(Qt::LinksAccessibleByMouse @@ -52,6 +65,8 @@ public: "[agent.js](https://github.com/github/copilot.vim/tree/release/copilot/dist)")); Column { + QString("" + Tr::tr("Note:") + ""), br, + warningLabel, br, authWidget, br, CopilotSettings::instance().enableCopilot, br, CopilotSettings::instance().nodeJsPath, br,