Code Canvas

Code Canvas is a product that enables developers of all skill levels to directly interact with snippets of code. It is designed to help developers have LLMs review, debug, append, and provide suggestions for code snippets. In this section, we cover how to use Code Canvas to interact with your code.

  • Navigate to the left side bar on the screen and you will see the Code Canvas icon - select the icon to get started.


Table of contents
  1. How to Use Code Canvas
    1. Introduction
    2. Methods of Using Code Canvas
    3. Menu Options
    4. Conclusion

How to Use Code Canvas

Introduction

Code Canvas is a versatile tool designed to streamline your coding workflow. You can either copy and paste code snippets directly into the canvas or submit a prompt in the prompt window to have the LLM generate new code for you. Unlike traditional methods, Code Canvas requires you to instruct the LLM to perform specific tasks with the code, making it ideal for debugging or enhancing code.

Methods of Using Code Canvas

Code Canvas Step 1
  1. Copy and Paste Code
    • Directly copy code snippets and paste them into the canvas. (All languages are supported)
  2. Prompt Code Canvas to Generate Code
    • Submit a prompt in the prompt window to have the LLM generate new code. For example:
      Generate a Python function that takes two arguments and returns their sum.
      

After copying and pasting the code snippet or submitting a prompt, you can interact with the code in the canvas.

  • You can manipulate the code directly
  • and/or prompt commands to the LLM to make changes.

This approach allows you to debug, enhance, or append code snippets as needed in a safe and controlled environment. Additionally, you can use the menu options to copy, undo, redo, or view changes made to the code.

Code Canvas Step 2

Note: The code generated by the LLM will not execute in the canvas. You will need to copy and paste the code into your IDE to run it.

Code Canvas Step 2
  • Copy: Duplicate selected code.
  • Undo: Revert the last action.
  • Redo: Reapply the last undone action.
  • Changes: View the history of changes made.

Conclusion

By following these steps, you can effectively use Code Canvas to enhance your coding workflow.


Back to top

Copyright © 2025 Ask Sage Inc. All Rights Reserved.