<type>documentation</type>
<domain>ai</domain>
<id>ai</id>
<title>AI Assisted Development Privacy and Data Protection</title>
<date>$Date: 2006-05-24 22:53:07 -0400 (Wed, 24 May 2006) $</date>
<version>$Revision: 13098 $</version>
<product>pro+</product>

Wing's AI development features are disabled by default. As long as the features are left
disabled, no code or other data of any kind will ever be uploaded to an AI provider.
Before you can use any of Wing's AI development features, you must complete all of the
following steps: (1) select an AI provider in Wing, (2) create an AI provider account,
(3) obtain an API key, (4) install the key into Wing, and (5) give explicit permission to
upload parts of your code to the AI provider.

Unless *all* of these steps are taken, *none* of the AI assisted development features will
work. Instead, you will be presented with a dialog asking you to enable and configure the
feature or, if the feature is already enabled, then you will be presented with a dialog
asking for your permission to upload content to the AI provider.

Wing will obtain upload permission the first time you try to use an AI assisted development feature
in each project. You can also manually display the permission dialog with the ``Approve Uploads to
...`` item in the ``AI`` menu.

After giving upload permission, you can revoke it at any time with the ``Revoke Upload
Permission`` item in the ``AI`` menu.

Note that enabling AI development and giving upload permissions is done on a
project-by-project basis, so you can leave the feature disabled in some projects and
enable it in others.

**AI Provider Privacy**

Once AI development is enabled, you should be mindful that all or part of your code will
be sent to the AI provider by secure encrypted ``https`` connection. Files that are
uploaded to the AI provider are removed again when they are no longer needed, when the
project is closed, or when Wing quits. This may fail in the case of a network outtage but
Wing keeps track of uploaded resources and retries their removal periodically as long as
it is running.

Wingware has no way of controlling whether the AI provider will continue to store your
code behind the scenes or use it in ways that you might not intend. You should review the
AI provider's privacy and data protection statements.

**Quality and Safety**

Similarly, Wingware has no way to assess the quality and safety of results you obtain from
the AI provider. AI suggestion and the ``AI Coder`` tool are both capable of directly altering your
code in the editor. If you use them, you should use a revision control system or other
means to carefully review all changes made to your code before you execute that code or
accept it into your code base.  

Selecting ``Review to Accept`` or ``Review to Reject`` in the ``AI Coder`` tool's ``Action`` menu
is another way to do a change-by-change review of edits made by your AI provider.

``AI Chat``, on the other hand, does not make changes directly to editors. It outputs results
only into the chat itself.  The code shown in the chat cannot be executed by Wing unless
you manually copy it into your code or into the Python Shell or Debug Probe in Wing.

**Monitoring Data Being Shared**

You can inspect what Wing sends to the provider with ``Show Console`` in the ``Options`` menu in the
``AI Coder`` and ``AI Chat`` tool. This displays the complete content of all requests made to the 
AI provider.
