Editing code in SourceCraft Code Assistant

Warning

SourceCraft uses the capabilities of AI models within Yandex. For this to work, some of your organization's data needs to be sent to Yandex.

In private organizations, you can disable data transfers to Yandex, but this will limit Code Assistant's capabilities.

Use the SourceCraft interface with built-in Code Assistant to edit your project code or add new files and directories. You can introduce changes directly into the repository branch or through a pull request.

Tip

For full-out coding, there is a Visual Studio Code-based cloud development environment called SourceCraft Spaces accessible via the browser.

Code Assistant is an AI-driven developer assistant based on large language models (LLM)s. With Code Assistant, you can optimize the code writing process and increase your performance.

The smart autocompletion mode enables the AI assistant to analyze the code context and come up with the most relevant suggestions for functions, cycles, conditions, and other elements.

Code Assistant also features a chat mode you can use to interact with the AI assistant in the SourceCraft interface, your IDE, or SourceCraft CLI with built-in OpenCode.

SourceCraft Code Assistant terms of use

SourceCraft Code Assistant documentation.

To edit code with Code Assistant:

  1. Open the SourceCraft home page.

  2. On the Home tab, under Your craftspace, navigate to Repositories.

  3. Select the repository with the code you need to edit.

  4. Under Code on the repository page, go to Branches.

  5. Select the branch for editing.

  6. Open the file that needs updates.

  7. In the top-right corner, click Edit.

  8. Start entering the text and see Code Assistant's suggestion.

    When generating a suggestion, the loading icon will appear to the left of the editable code. If generation stops or there is no result, you will see the (no suggestion) icon.

  9. Select what to do with the suggestion:

    • Click Tab to accept the suggestion.
    • To start accepting the suggestion word by word, press Ctrl + → for Windows or Linux or Command + → for macOS.
    • To discard the suggestion, press Esc.
  10. In the top-right corner, click Commit changes.

  11. In the window that opens, configure the procedure for changes:

    • In the Commit message field, give a comment that will describe the changes you make.
    • Under Commit branch, select the branch you want to change. Create a new branch as needed.
    • Under After commit action, select how to make changes: via a commit or a pull request.
  12. Confirm your changes.

    If you opt to submit a pull request, finish creating one.

See also