/
Core - User Guide

Core - User Guide

In this section, you will learn all the features of AllAi Code and the best practices for the features with Core examples.

All features are not available on trial accounts.

Features:


1. Code Generation (with Interactive Chat)

Open the AllAi Interactive Chat and type what you need. If you like the proposed code, you can press "Insert to editor" button to place the code to where your cursor is.

2025-04-04_09h41_17.png
2025-04-04_09h44_42.png
Code Generation with Interactive Chat

Engage in a conversation with AllAi Code to find solutions to your coding issues.

AllAi Code understands the code in your editor and selected parts, offering context-aware tailored responses. The suggested solutions can be easily integrated into your working file with just one click.

  • Be as specific as you can. The more specific you are, the better results you'll get from AllAi Code.

  • Include examples. Explain the type of outcome you expect, with examples or detailed explanations.

  • Provide references. Be sure to provide any relevant references or resources.

  • Split complex tasks: AllAi Code does better if you feed it small, well-scoped questions. So break your complex task into smaller sub-tasks and walk through instructions step-by-step.

  • Use positive instructions. Tell it what you want to get instead of what you don't want.

Always ready to write code on your behalf.

Ask AllAi Code to write code for you, using natural language. You can even turn TODO comments into code.

Tips

  • Ask AllAi Code to generate only one function each time.

  • Document as best as you can your code (with docstring and comments).

  • Specify your requirements clearly and with detail.

  • Remember you can implement TODO comments so you don’t need to code to meet the requirements set in the comments you had on your TODO list.

  • AllAi Code will generate more accurate pieces of code when the file is not blank as it is also fed with the code of your file.

1.1. Bug/Issue fixing with Chat

At OSF Digital, we believe that the true power of AllAi lies not just in its features, but in the adeptness of the user's prompting skills. Our course modules are meticulously designed to transform our clients into proficient prompters, enabling them to harness the full capabilities of AllAi.

In the following example, we demonstrate the practical application of this skill. Observe how, through prompting, we guide AllAi to analyze an issue and formulate an effective solution.

Fix and Rewrite Code with Interactive Chat

 

  • Have a clear definition of functions and parameters.

  • Document as best as you can your code (with docstring and comments).

  • Select only the piece of code in which you want to find bugs.

  • Check fix suggestions before adding them.

  • Remember AllAi Code is more suitable for smaller fixes.

2. Code Completion

First, don’t forget to select in the Extensions settings the Maximum lines of code you want to be automatically completed.

2025-04-03_17h24_39.png
Inline Completion Settings

Just type and wait! You will see the running cycle of AllAi at the right bottom corner.

This means, it's working and will show you the result in a few seconds.

cut gif (1).gif

You know you’re in tune when you’re finishing each other’s lines of code.

Based on the code you already have in your editor, AllAi Code tries to understand and complete the code for you. If the first auto-completion is not enough, you can generate a list of different variations of the same code and choose the best one.

Tips

  • Break your code into small functions.

  • Use significant names for the parameters of your code.

  • Document your code with comments: AllAi Code can also autocomplete your comments at any time. You just need to start writing and wait.

  • Remember you can get different suggestions for code completion on each try.

  • AllAi Code will suggest you better completions in non-empty files, as it works based on the code you already have in your editor.

3. Code Explanation

Select a piece of code, "Right Click" and select “OSF Digital - AllAi > Explain code“:

image-20250403-135948.png
Explain Code

Learn effortlessly with a tireless teacher.

It helps you understand badly documented/written code and get familiar with languages and frameworks you have not worked with before by giving you a short and simple explanation of code blocks in plain English.

Tips

  • Enter your code using functions.

  • Add a relevant name for each function parameter.

  • Select only pieces of code to clarify specific functions or parts of functions, not the whole file.

  • It helps you navigate unfamiliar frameworks. Even works with obscure SQL queries and regex.

  • You will have a better explanation if the file is not empty. The more data in the file, the more chances for AllAi Code to understand and explain your code.

4. Docstring Generation

First, Right Click anywhere inside the function block.

Then select “OSF Digital - AllAi > Generate docstring”.

2025-04-03_17h02_32.png
Docstring Generation

AllAi Code can also understand what your function is doing and even infers its return type to generate a detailed docstring. It works for multiple functions.

 Tips

  • Use functions.

  • Use meaningful parameter names.

  • Select the part of the code you want to document.

  • Remember you can generate docstring in batch. No need to generate docstring one by one.

  • AllAi Code works best if the file is not blank. The more data in the file, the more accurate it is.

5. Docstring Generation (batch)

First, Right Click anywhere inside the file.

Then select “OSF Digital - AllAi > Batch generate Docstring”.

AllAi will start generating docstrings for each method one by one.

2025-04-03_17h08_40.png
Generate Docstring (Batch)

6. Unit Test Generation

Select the whole class or a method that you want to generate unit tests.

Then Right Click anywhere inside the file and select “OSF Digital - AllAi > Generate unit tests”.

2025-04-04_10h04_42.png
Generate Unit Tests

Modify the result

After the unit tests are generated, you can modify the result by giving instructions to AllAi.

E.g. “add 2 invalid cases“

2025-04-04_10h07_32.png
Generate Unit Tests (Modifying the Result)

7. Knowledge Bases

You can enable AllAi to browse the Salesforce documentation pages before answering the questions. And once it's done generating the answer, it will reference its sources. 

Enable the Knowledge Bases that you want AllAi to focus on while generating answers by selecting it with a tag in the chat input field.

2025-04-04_10h22_31(1).gif
Knowledge Base Selection

Ask your question and AllAi will give references to the sources that it used while generating the answer. You can click on the links to open it in your browser.

2025-04-04_10h25_44.gif
Making a Request with a Knowledge Base Selected

8. Workspace Indexing

AllAi can only see one file at a time. It only sees the open file. So it's not aware of any functions or interfaces that you might have defined in other files.

With the Workspace Indexing feature, AllAi indexes your entire workspace, allowing it to "memorize" all the code you have and use it as a reference when answering questions in Chat.

Your entire workspace is automatically indexed when you open it in VS Code for the first time. To confirm this, just check for the presence of the .allai folder in your workspace. It should contain the workspace.db file inside.

The workspace.db file will consequently be added to the changes made to your workspace. However, it’s not mandatory to stage and commit it to your branch. You can always discard it.

2025-04-04_10h36_28.png
Workspace Indexing Files

To use the advantages of the Workspace indexing feature, simply select the “Workspace“ option as you did with the Knowledge Base selection.

2025-04-04_10h42_47.gif
Selection of the Workspace as a Knowledge Base

First, ask your question.

Then, check the answer and the “Sources” used.

Lastly, Click on a source to open the file and check the code.

2025-04-04_11h01_17.gif
Workspace Indexing (Result)

 

9. Slash commands

The Slash Commands feature in AllAi Code empowers you to streamline repetitive tasks by defining custom commands through .prompt files. These commands can be invoked directly in the chat using the / symbol, making your workflow smoother and more efficient.


🧩 What Are Slash Commands?

Slash Commands allow you to:

  • Automate repetitive coding tasks (e.g., generating docstrings, creating boilerplate code).

  • Customize prompts based on your coding standards and preferred languages.

  • Seamlessly integrate context-aware commands in your chat by using / symbol.


📂 File Structure

Slash Commands are defined using .prompt files with a structured JSON format.

{ "handle": "command_handle", "name": "Example Command", "description": "Short description of your command", "prompt": [ { "sender": "system", "contentTemplate": "A custom system message" }, { "sender": "user", "contentTemplate": "The message that will be added in the chat." } ] }

When you open a .prompt file, a custom editor will open with a graphical user interface so you don’t need to write any JSON.

⚙️ How It Works

  1. Create a .prompt file in your project.

  2. Define your command:

    • handle: Unique identifier (used with / to trigger the command).

    • name: Descriptive name of the command.

    • description: Brief description of what the command does.

    • prompt: Sequence of messages to generate output, using placeholders (e.g., {{language}}, {{selection}}).

  3. Trigger the command in the chat:

    • Use /handle (e.g., /docstring).

    • AllAi Code will:

      • Process the selected code or context.

      • Apply the defined prompts

      • Return the generated output.

📌 Supported Placeholders

Placeholder

Description

Placeholder

Description

{{input}}

The text after /handle

{{selection}}

Currently selected code in your editor

{{file_name}}

The name of the currently open file

{{language}}

The language of the currently open file

Slash commands.mp4

 

Related content