Please note that this extension may be downloaded but it will only operate fully for participants in the SAS private preview who have a signed agreement with SAS and have a Viya 4 license. OverviewThe SAS Viya Copilot extension for Visual Studio Code is a tool that enhances your productivity as you program in SAS. SAS Viya Copilot uses Generative Artificial Intelligence (GenAI) to add comments to SAS code, write an explanation for existing SAS code, and generate SAS code based on instructions in comments in a SAS program. We are presently running a Private Preview program to use SAS Viya Copilot. If you encounter any bugs or have suggestions, please report as issues. Please contact ViyaCopilotTeam@sas.com if you have any questions. Prerequisites
Connecting to your Viya accountIf you have already setup your Viya account in the official SAS Extension, you may skip this step.
For more information on this process, please refer to the official SAS Extension's documentation Enabling the GenAI Gateway Feature
Congratulations! You should be able to use the SAS Viya Copilot extension now. If you do not see the GenAI Gateway feature, or the toggle is greyed out, please contact your SAS Administrator. 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:
|