Editing code in SourceCraft Code Assistant

You can edit your project code in the SourceCraft interface. You can introduce changes directly into the repository branch or via a pull request.

The SourceCraft code editor comes with a built-in component called Code Assistant.

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 Code Assistant to analyze the code context and come up with the most relevant suggestions for functions, cycles, conditions, and more.

SourceCraft Code Assistant terms of use

For more information, see the relevant SourceCraft Code Assistant documentation.

SourceCraft Code Assistant documentation

To edit code with Code Assistant:

  1. Open the SourceCraft home page.

  2. On the Home tab, 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 change parameters:

    • In the Commit message field, specify the comment describing the changes you have made.
    • Under Commit branch, select the branch you want to edit. If required, create a new branch.
    • Under After commit action, select how to make changes: via a commit or pull request.
  12. Confirm your changes.

    If you opt for a pull request, finish creating it.

See also