Chat with Code Assistant in SourceCraft

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.

Opening a chat

  1. Open the SourceCraft home page.
  2. If you need Code Assistant to have a specific context without explicitly stating it in a chat message, navigate to the relevant page, such as opening a repository, a specific file, or a task.
  3. In the panel on the left, click Code Assistant Chat.

Sending a message

Write your request to the AI assistant in the message input field and click or press Enter.

For a line break in the message, press Shift + Enter.

Note

Additional context provided in Code Assistant, such as a pull request or task, is displayed in the message input field.

Stopping response generation

If you changed your mind and want to rephrase your question, click Stop in the message input window.

Opening a new chat

Click in the chat's top panel.

Viewing the list of chats

  1. Click in the chat's top panel.
  2. From the list that opens, select the chat you want to go back to.

To delete a chat from the list, click the button next to it.

Code blocks

Code Assistant answers may contain code examples. Above the code block, you will see the programming language it was written in.

Copying code from a chat

In the right-hand corner of the panel above the code block, click .

Expanding and collapsing a code block

To make it easier to navigate the chat, the system automatically collapses large blocks of code. To expand or collapse a code block, click or under it.

Closing a chat

Click in the chat's top panel.

Tip

Chat history is saved. You can return to a specific chat later.

See also