To access the latest features keep your code editor plug-in up to date.
The standard way to add an OpenAI API key in VS Code is to use the gear
icon in the Navie chat window, but you can alternatively set the key using the VS Code Command Palette with an AppMap
command option.
In VS Code, open the Command Palette.
You can use a hotkey to open the VS Code Command Palette
Cmd + Shift + P
Ctrl + Shift + P
Or you can select View
-> Command Palette
Search for AppMap Set OpenAPI Key
Paste your key into the new field and hit enter.
You’ll get a notification in VS Code that your key is set.
NOTE: You will need to reload your window for the setting to take effect. Use the Command Palette Developer: Reload Window
To delete your key, simply open the Command Palette
You can use a hotkey to open
Cmd + Shift + P
Ctrl + Shift + P
Or you can select View
-> Command Palette
Search for AppMap Set OpenAPI Key
And simply hit enter with the field blank. VS Code will notify you that the key has been unset.
NOTE: You will need to reload your window for the setting to take effect. Use the Command Palette Developer: Reload Window
For secure storage of API key secrets within AppMap, we use the default VS Code secret storage which leverages Electron’s safeStorage API to ensure the confidentiality of sensitive information. Upon encryption, secrets are stored within the user data directory in a SQLite database, alongside other VS Code state information. This encryption process involves generating a unique encryption key, which, on macOS, is securely stored within Keychain Access
under “Code Safe Storage” or “Code - Insiders Safe Storage,” depending on the version. This method provides a robust layer of protection, preventing unauthorized access by other applications or users with full disk access. The safeStorage API, accessible in the main process, supports operations such as checking encryption availability, encrypting and decrypting strings, and selecting storage backends on Linux. This approach ensures that your secrets are securely encrypted and stored, safeguarding them from potential threats while maintaining application integrity.
The standard way to add an OpenAI API key in JetBrains is to use the gear
icon in the Navie chat window, but you can alternatively set the key directly in the JetBrains settings.
In JetBrains, open the Settings
option.
In the Settings
window, search for appmap
in the search bar on the side. Under the Tools -> AppMap
you will see a configuration option for your OpenAI API Key in the AppMap Services
section. This is the same section you are able to add/edit/modify your other environment settings for using your own custom models.
AppMap follows JetBrains best practices for the storing of sensitive data. The AppMap JetBrains plugin uses the PasswordSafe
package to securely persist your OpenAI API key. The default storage format for PasswordSafe
is operating system dependent. Refer to the JetBrains Developer Documents for more information.