Code Assistant in SourceCraft

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

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

SourceCraft Code Assistant terms of use

SourceCraft Code Assistant documentation

Editing code

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.

The smart autocompletion mode explicitly supports code autocompletion for the following programming languages and frameworks:

  • C++
  • Go
  • Java
  • JavaScript/TypeScript
  • Kotlin
  • Python
  • Scala
  • SQL
  • Swift

Autocompletion may also work for other languages. For languages ​​that are less represented in public repositories, the number and quality of autocompletion prompts will be lower.

Code Assistant supports the following types of suggestions:

  • Inline completion: Text autocompletion as you type. Works for code, texts, and documents.
  • Full-function completion: Autocompletion of entire functions or methods.

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.

For more information, see Editing code in SourceCraft Code Assistant.

Chat mode

The SourceCraft interface has a built-in chat with Code Assistant you can use to interact with the AI assistant.

The following scenarios are supported:

  • SourceCraft user help, FAQ.
  • Searching through the documentation.
  • Generating code snippets.
  • Explaining code in project files or individual file sections, including code in markdown syntax intended for documentation.
  • Help with debugging and troubleshooting.
  • Generating tests for your code.
  • Generating documentation.
  • Scanning code for potential issues.
  • Suggesting improvements and alternative solutions.
  • Generating charts.
  • Writing commit messages.

The page in the SourceCraft interface you view defines the context for Code Assistant, e.g., repository files, current open file, pull request or issue content, etc.

For more information, see Chat with Code Assistant in SourceCraft.

AI code review

SourceCraft is equipped with a built-in system for automated AI code review of pull requests. The AI assistant analyzes code changes, detects potential errors, architectural issues, and style inconsistencies, and provides code quality improvement recommendations.

With AI code review, you can save time on manual reviews, enhance code robustness and readability, and accelerate the change acceptance process.

For more information, see AI code review of a pull request in SourceCraft.

See also