Please note that this extension may be downloaded but it will only operate fully for participants in the 2024 SAS Hackathon who have a signed agreement with SAS. OverviewThe SAS Viya Copilot Extension for Visual Studio Code is a great tool to enhance your productivity as you program in SAS. SAS Viya Copilot uses Generative Artificial Intelligence (GenAI) to add comments to a block of SAS code, write an explanation of a block of SAS code, and generate SAS code based on a block of comments in a SAS program. We are presently undergoing internal testing. If you encounter any bugs or have suggestions, please report as issues. Please contact ViyaCopilotTeam@sas.com if you have any questions. TipsFor the richest experience, including syntax highlighting, code completion, and many other features, use this extension along with the official SAS Extension Specifying the API KeyAn API key is required to use this extension. Please contact jon.leirer@sas.com if you are having trouble finding your API key. When you run any of the commands (Add comments, Explain, or Generate code) for the first time, you are prompted to enter your API key. Your API key can also be entered through the SAS Viya Copilot extension settings. Note: After you enter your API key the first time, the key is saved and used for additional commands until you explicitly clear the key. To clear the API key, press Ctrl (or Command for Mac users) + Shift + P, and run the SAS Copilot: Clear API key command. Running the SAS Viya Copilot ExtensionThe SAS Viya Copilot extension includes commands to generate code, add comments, and explain code. Generate CodeTo generate SAS code:
Note: To generate code from a longer, multi-line prompt, highlight entire prompt and then select "Generate Code" Add CommentsTo add comments to an existing block of SAS code:
Explain CodeTo generate an explanation of a block of SAS code:
The explanation of the code block is displayed in the SAS Viya Copilot conversation pane on the left side of the application window. Alternative Ways to Run CommandsContext MenuYou can run any of the SAS Viya Copilot commands by right-clicking a selected block of code or comments and selecting a command from the context menu. Visual Studio Code Command PaletteTo run SAS Viya Copilot commands with the Command Palette:
|